react-native - 反应本机任务:app:validateSigningDebug FAILED
问题描述
我对 react-native 和 android 完全陌生。我已经从 Github 下载了一个项目并使用命令yarn install
并react-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
解决方案
问题是构建正在寻找调试密钥库并且找不到它。
/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
推荐阅读
- python-3.x - Given a sentence, how can I generate similar sentences of that particular sentence but not with the same meaning using machine learning?
- flutter - Error: Entrypoint isn't visible within the current project in flutter project
- gpu - GCE (Google Compute Engine) GPU Quota >= 1 但启动 VM 失败
- gitlab - 测试发光元素应用程序时出现 gitlab 错误
- oracle - PLSQL import JSON and export as a JSON file
- javascript - 关于如何调整在 d3 中包装文本的函数的建议
- publish - 使用 HTTPS 端点的跨账户 SNS 发布:如何识别发起账户?
- python - 使用 cv2 收集图像数据时出现问题
- java - 如何将方法中随机生成的数字附加到数组中
- c# - 在 Xamarin 中的 SearchBar 控件上使用 SearchButtonPressed 事件