Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Your Android App Bundle is signed with the wrong key. Ensure that your app bundle is signed with the correct signing key and try again

How do I sign my android app bundle with the correct signing key?

like image 543
skfp Avatar asked Sep 25 '18 21:09

skfp


People also ask

How do I fix my Android App Bundle is signed with the wrong key?

Answers related to “Your Android App Bundle is signed with the wrong key. Ensure that your App Bundle is signed with the correct signing key and try again” first, you need to generate a signing key using keytool and create keystore file for your project.

How do I change my app bundle signing key?

Open you React Native's project android folder. Go to Build -> Generate Signed Bundle / APK. Select Android App Bundle. Enter your key-store details (if this is your first time doing this, you have to check the Export encrypted key checkbox, which you can use for Google Play App signing) and click Next.

How do I make an android signing key?

In the menu bar, click Build > Generate Signed Bundle/APK. In the Generate Signed Bundle or APK dialog, select Android App Bundle or APK and click Next. Below the field for Key store path, click Create new. On the New Key Store window, provide the following information for your keystore and key, as shown in figure 2.

How do I change my app signature?

You can't change the key you used to sign any previous versions - Google Play will reject any uploads which aren't signed with the same key. Just increment the version number and sign with the same key and upload it.


3 Answers

The error suggests that you have uploaded an APK or an App Bundle previously. All the artifacts you upload to the Play Console should all be signed with the same keystore. So the error means that you signed the App Bundle with a key that is different than the ones you have uploaded previously. You have to either find that keystore you used before or reset the key by contacting Play Console support team.

like image 148
Pierre Avatar answered Sep 18 '22 19:09

Pierre


I tried using the multiple answers here & in this question, but somehow I was getting this error because I had some issues with my android/app/build.gradle and android/gradle.properties files.

Two things you should check (in addition to the other solutions here) are:

  1. In android/gradle.properties and android/app/build.gradle, make sure your keystore variables match exactly.
    • In android/gradle.properties, you probably have something like this:
      MYAPP_RELEASE_STORE_FILE=<> MYAPP_RELEASE_KEY_ALIAS=<> MYAPP_RELEASE_STORE_PASSWORD=<> MYAPP_RELEASE_KEY_PASSWORD=<> 
    • Make sure these variable names exactly match those in android/app/build.gradle:
      android {     ...     signingConfigs {         release {             if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {                 storeFile file(MYAPP_RELEASE_STORE_FILE)                 storePassword MYAPP_RELEASE_STORE_PASSWORD                 keyAlias MYAPP_RELEASE_KEY_ALIAS                 keyPassword MYAPP_RELEASE_KEY_PASSWORD             }         }     } } 
  2. In android/app/build.gradle, make sure you set signingConfig to signingConfigs.release in your release buildTypes:
    android {     ...     buildTypes {         debug ...         release {             signingConfig signingConfigs.release         }     } } 
like image 36
Blundering Philosopher Avatar answered Sep 19 '22 19:09

Blundering Philosopher


I was banging my head on the table over this for about two hours. When I finally gave up and was filling out my "reset key" request, I realized that I was currently attempting to upload it to the wrong project the whole time.

So, step one: confirm that you're attempting to upload to the correct project.

like image 23
David Avatar answered Sep 19 '22 19:09

David



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!