Android 如何修复找不到用于签名配置的密钥库文件';调试';错误?
我正在尝试设置新的react native项目,但在尝试react native run android时遇到此错误:Android 如何修复找不到用于签名配置的密钥库文件';调试';错误?,android,ios,reactjs,react-native,mobile,Android,Ios,Reactjs,React Native,Mobile,我正在尝试设置新的react native项目,但在尝试react native run android时遇到此错误: What went wrong: Execution failed for task ':app:validateSigningDebug'. > Keystore file 'C:\Users\Ahers\Downloads\reactnative-beautiful-ui-master (1)\reactnative-beautiful-ui-master\andro
What went wrong:
Execution failed for task ':app:validateSigningDebug'.
> Keystore file 'C:\Users\Ahers\Downloads\reactnative-beautiful-ui-master (1)\reactnative-beautiful-ui-master\android\app\debug.keystore' not found for signing config 'debug'.
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Note: C:\Users\Ahers\Downloads\reactnative-beautiful-ui-master (1)\reactnative-beautiful-ui-master\node_modules\react-native-gesture-handler\android\src\main\java\com\swmansion\gesturehandler\react\RNGestureHandlerButtonViewManager.java uses or overrides a deprecated API.
这是我的build.grade代码:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.4.1")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
}
}
我尝试运行此命令以修复它,但无效:
keytool -genkey -v -keystore debug.keystore
-storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
老实说,我不知道该怎么做,所以我希望您能给我一些建议。您的密钥库文件似乎已被删除或更改
你可以通过Android studio生成它。用这个。你好,先生。当我点击build时,我没有想到这些选项。有什么方法可以消除对这个密钥库文件的需要吗?对不起,先生,不能消除密钥库文件来生成签名的构建。如果您想生成调试版本,那么就没有必要了。您是否尝试过通过Android studio生成密钥库?您好,先生。我试过了,谢天谢地它成功了。非常感谢你!