I'm trying to upload a brand new .aab file to the Google Play Console, but keep getting this error:
Upload failed You uploaded an APK or Android App Bundle that is signed with a key that is also used to sign APKs that are delivered to users. Because you are enrolled in App Signing by Google Play, you should sign your APK or Android App Bundle with a new key before you upload it.
I'm completely stumped, as I generated a new key for this app bundle at the time of generating the app bundle, i.e. through the Build > Generate Signed Bundle / APK... menu item in Android Studio, so it is a brand new key, unused by other apps. I've even tried creating a whole new keystore with a new key in it, but always get the same error. Is this some quirk someone else has come across?
When enrolling for App Signing by Google Play for this app, I chose the "Let Google manage and protect your app signing key (recommended)" option, and from all the documentation I've read, the key that you use to sign the app with first becomes the "Upload Key", so it seems like I'm doing everything correctly, but no dice.
Does anyone have any advice, or past experience on this?
I am facing the same issues, in my case signingConfig
was setup, I made one simple mistake, that I forget to change app debuggable to false. so even though I generated from menu or from gradle command, build was successfully generated but it was debuggable so play store not accepting signed apk and give me and message like Upload Failed The Android Bundle was not Signed in
.
make sure to change app debuggable to false in build.gradle
file
https://i.stack.imgur.com/YivNa.png
Well, after a lot of screaming and shouting, including reaching out to Google Play Console support in chat (they're only first level support, so... not much help) and email (who put me in the too hard basket and said they can't offer support for app development - what? the problem is to do with uploading an app to Play Console, not app dev!), I discovered this self answered question https://stackoverflow.com/a/54359729/845205.
Basically, make sure you're doing a Clean & Rebuild Project whenever doing anything to do with signing in Android Studio. For some reason it thought my new app was using the key from my old app and kept signing with that. (I guess the solution was app development support after all!)
"through the Build > Generate Signed Bundle / APK... menu item in Android Studio, so it is a brand new key, unused by other apps."
Not really. The keystore that Android Studio uses is associated with the Android SDK installation, so all the apps created from your Studio are signed with the same key.
What happened is that you must have created another app, signed it with that keystore, and uploaded it to the Play Console, thus making it a key used to sign APKs served to end users. At the same time, you created another app which you enrolled in Play Signing: for this app, the upload certificate is extracted from the first APK you upload. Since you signed that APK with Studio as well, the same keystore was used. Play detected that it was the same certificate for both those apps, and since you used the same key for two different purposes (app signing key for your first app, and upload key for your second app), Play rejected it. The reason is that an app signing key is much more important than an upload key (the latter can be reset while the first one can't), so you shouldn't use them for two different purposes.
In other words, you'll need to create a different keystore to sign your apps enrolled in Play Signing (ideally, one per app), and make sure you never use that keystore as an app signing key for another app.
I hit this error in our apps. We use the same upload key for all of our apps.
So when you create a new app, make sure you select the option Use an existing key that you sign an app with
instead of the (Google recommended)
option which is to send them an unique upload key.
The really annoying part is that this option can only be selected once, so we had to delete our app and recreate it.
The solution for me turned out to be a matter of changing the build variant.
To recap, when I tried to upload my signed .aab bundle file into the Google Play Console for developers, I received this error The Android App Bundle was not signed.
Keep in mind that this error is ambiguous and could be caused by a number of issues as visible in the other answers on this page. I had originally uploaded my app using the release
build variant. Forgetting what variant I had used originally, I tried to upload the debug
build variant and got this error.
My fix: Upload the same build variant as the original one. They must match!
The following solution worked for me. Add following two lines to your gradle file.
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
**signingConfig
debuggable = false**
}
Try removing everything about the new app from console, then start by generating a new key and rebuilding the app with the new key. Then you can re upload the new apk.
I have had the same problem, i solved it by removing my app and adding it again to play console.
The other way this can happen is if you have a signingConfig set up in the app build.gradle. It doesn't seem to matter what you specify in the signing section when you're making a bundle - even if you make a new one or choose some other keystore - it will use the one specified in the gradle file.
i also face this issue i add this line signingConfig signingConfigs.release
in android > app> build.gradle > {buildType{release{ signingConfig signingConfigs.release }}}
In my case it was because I was choosing the debug folder instead of release folder in my project as the destination for the Android App Bundle.
I needed the App Bundle for internal testing so I guess that's why it came natural to me to choose it.
i know this is an old issue but since i just hit this problem and my solution is not listed, i want to share it so it can help some future stackies.
My problem with signing the app was the entry testCoverageEnabled true
which was inside the
buildTypes{ release { ... }}
even though debuggable false
was set, googles error message was Upload Failed The Android Bundle was not Signed
or debuggable version was uploaded
setting the testCoverageEnabled flag to false fixed my issue.
Just create a new key, and it should upload.
I've even tried creating a whole new keystore with a new key in it, but always get the same error.
Success story sharing
signingConfig signingConfigs.release
in android > app> build.gradle >{buildType{release{ signingConfig signingConfigs.release }}}
buildTypes
release
debuggable was still set to true.