6

Reading The apk must be signed with the same certificates as the previous version

I see the problem described as

Upload failed

You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate.

The accepted answer states (from the android website)

the .apk must be signed with the same private key. If the package name and signing certificate do not match those of the existing version, Market will consider it a new application and will not offer it to users as an update.

Other answers additionally claim that you have to have the original keystore.

That's 3 different statements. Which one is it?

  • Do the keystores have to be the same (and how would that be checked)?
  • Can I use a different keystore as long as they include an identical certificate?
  • Can I use a different certificate, as long as it's derived from the same keypair?
Community
  • 1
  • 1
Martijn
  • 11,183
  • 10
  • 46
  • 92
  • 2
    "Can I use a different keystore as long as they include an identical certificate?" -- presumably, though I have not tried exporting a cert via `keytool` and importing it into a separate keystore. "Can I use a different certificate, as long as it's derived from the same keypair?" -- I don't think so. I think Android is comparing the certificates themselves. Leastways, what gets baked into the app, that we can access via `PackageManager`, is the `X509Certificate`. – CommonsWare Sep 16 '16 at 12:24

3 Answers3

0

Read the documentation: Launch Checklist & Publishing Updates on Android Market

Before uploading the updated application, be sure that you have incremented the android:versionCode and android:versionName attributes in the element of the manifest file. Also, the package name must be the same and the .apk must be signed with the same private key. If the package name and signing certificate do not match those of the existing version, Market will consider it a new application and will not offer it to users as an update.

waqas ali
  • 1,228
  • 10
  • 16
  • https://developer.android.com/studio/publish/app-signing.html#considerations says "You should sign all of your APKs with the same *certificate* throughout the expected lifespan of your apps.". Later on it says "Your *private key* is required for signing all future versions of your app.", hence the confusion – Martijn Sep 28 '16 at 09:35
0

From the android support reference link's, following are the points that conclude the scenario. If you could make your trial's pass these three, there should not be any hassle

  • The Package Name of the updated APK needs to be the same as the current version.
  • The Version Code needs to be greater than that current version.
  • The updated APK needs to be signed with the same signature as the current version.

To verify that your APK is using the same certification as the previous version, you can run the following command on both APKs and compare the results

$ jarsigner -verify -verbose -certs my_application.apk

If the results are identical, you’re using the same key and are ready to continue. If the results are different, you will need to re-sign the APK with the correct key.

For more details go through this link mentioning Sign Your App Procedures

Sreehari
  • 5,411
  • 2
  • 21
  • 56
0

Actually you need to update mandatory

  • Apk Version
  • Version Code

Must be Same :

  • keystores & Password
  • Pckd Name.