Roman Panaget
Roman Panaget

Reputation: 2438

Updating app with different key

I updated Android Studio yesterday and today I wasn't able to update my app on Google Play Store. When I upload the APK file, Google tells me that the app is signed with a different key but I used the same keystore as always, how can I fix this? How can I check which keys are stored in my keystore and how to choose which one to use? I saw other similar questions but it was not enough detailed.

Thanks in advance.

Upvotes: 1

Views: 1047

Answers (2)

Knossos
Knossos

Reputation: 16068

If you have access to the APK that is currently online, you can check the signed certificate hashes.

Firstly get the hashes of your APK that is online:

keytool -list -printcert -jarfile online.apk

Then check the hash of your newer APK:

keytool -list -printcert -jarfile new.apk

You can compare for example, the SHA1 hash:

SHA1: 00:...*snip*...:FF

If they don't match then you know that the keystore you are using is not correct.

Upvotes: 1

Slobodan Antonijević
Slobodan Antonijević

Reputation: 2643

In Android Studio when you Generate Signed APK, and select the correct key store. Once you enter the correct keystore password, you will be able to select stored keys in Key alias part. Click on ... and in new dialog (Choose Key) you will see all your stored keys under Use an existing key dropdown

Upvotes: 0

Related Questions