Reputation: 1131
I'm trying to upload my AAB file to Google Play Store, i follow this https://facebook.github.io/react-native/docs/signed-apk-android for generating .aab file, but i'm getting this error You uploaded an APK or Android App Bundle that was signed in debug mode. You need to sign your APK or Android App Bundle in release mode.
Upvotes: 21
Views: 15676
Reputation: 511556
This is an issue for Flutter as well as React Native. To state it more briefly, the release block of buildTypes in android/app/build.gradle needs to include signingConfigs.release
, not signingConfigs.debug
.
buildTypes {
release {
signingConfig signingConfigs.release
}
}
This is shown in the Flutter documentation, but it isn't clearly stated. I've seen two people miss it in the last day.
minifyEnabled
and proguardFiles
are not required unless you need those options.
Upvotes: 13
Reputation: 1495
In 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"
}
}
change to
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"
}
}
Upvotes: 39