如何修复找不到用于签名配置'debug'的密钥库文件错误?



我正在尝试设置一个新的反应原生项目,但是当我尝试反应原生运行安卓时遇到了这个错误:

What went wrong:
Execution failed for task ':app:validateSigningDebug'.
> Keystore file 'C:UsersAhersDownloadsreactnative-beautiful-ui-master (1)reactnative-beautiful-ui-masterandroidappdebug.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:UsersAhersDownloadsreactnative-beautiful-ui-master (1)reactnative-beautiful-ui-masternode_modulesreact-native-gesture-handlerandroidsrcmainjavacomswmansiongesturehandlerreactRNGestureHandlerButtonViewManager.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生成它。使用此链接。

相关内容

  • 没有找到相关文章

最新更新