首页 > 解决方案 > 反应本机任务:app:validateSigningDebug FAILED

问题描述

我对 react-native 和 android 完全陌生。我已经从 Github 下载了一个项目并使用命令yarn installreact-native run-android运行该项目。但得到这个错误。似乎无法理解原因。我应该怎么办?

info Starting JS server...
info Installing the app...
> Task :app:validateSigningDebug FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
17 actionable tasks: 17 executed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:validateSigningDebug'.
> Keystore file '/home/tawsif/react native/react-native-redux/android/app/debug.keystore' not found for signing config 'debug'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s

标签: react-native

解决方案


问题是构建正在寻找调试密钥库并且找不到它。

/home/tawsif/react native/react-native-redux/android/app/debug.keystore未找到用于签署配置“调试”的密钥库文件。

React Native GitHub 中存在同样的问题。根据页面,您可以通过创建调试密钥库来解决它。从线程引用:

android/app/您可以通过在目录中运行以下命令来生成调试密钥库 :keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

问题链接:https ://github.com/facebook/react-native/issues/25629


推荐阅读