Reputation: 4961
I made an application on android and published it on the play store. I signed my apk with a new private key.
Last week, i wanted to update my application with my new features. when i try to install new version on the device its give me error msg :
application not installed , an existing package by the same name with conflicting signature is already installed ,
So my question is, compare between the key im using in my new release and the one ive in the play store , to make sure im using the same private key
Upvotes: 1
Views: 2009
Reputation: 1468
This will happen when you switch from a debug version to a release version and back.
The solution is to simply uninstall the old version.
Android Studio will detect this and offer to uninstall the old version.
Upvotes: 0
Reputation: 22709
First, unzip the APK and extract the file /META-INF/ANDROID_.RSA (this file may also be CERT.RSA, but there should only be one .RSA file).
Then issue this command:
keytool -printcert -file ANDROID_.RSA
You will get certificate fingerprints like this:
MD5: B3:4F:BE:07:AA:78:24:DC:CA:92:36:FF:AE:8C:17:DB
SHA1: 16:59:E7:E3:0C:AA:7A:0D:F2:0D:05:20:12:A8:85:0B:32:C5:4F:68
Signature algorithm name: SHA1withRSA
Then use the keytool again to print out all the aliases of your signing keystore:
keytool -list -keystore my-signing-key.keystore
You will get a list of aliases and their certificate fingerprint:
android_key, Jan 23, 2010, PrivateKeyEntry,
Certificate fingerprint (MD5): B3:4F:BE:07:AA:78:24:DC:CA:92:36:FF:AE:8C:17:DB
Voila! we can now determined the apk has been signed with this keystore, and with the alias 'android_key'.
Keytool is part of Java, so make sure your PATH has Java installation dir in it.
Source: How do I find out which keystore was used to sign an app?
Upvotes: 5