我正在尝试将我的 AAB 文件上传到 Google Play 商店,我遵循 https://facebook.github.io/react-native/docs/signed-apk-android用于生成 .aab 文件,但出现此错误 您上传了在 Debug模式下签名的 APK 或 Android App Bundle。您需要在 Release模式下签署您的 APK 或 Android App Bundle。
最佳答案
在 android/app/build.gradle
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
改成
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://facebook.github.io/react-native/docs/signed-apk-android.
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
关于android - 您上传了以 Debug模式登录的 APK 或 Android App Bundle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57990519/