5

I am trying to upload my Android app to the Google Play market and I get the error:

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

The funny thing is I am using the original keystone with the original passwords, so I am confused as to what could be causing this problem.

1) I did upgrade my Mac OS X to Lion which a 64 bit OS from I think the earlier 32 bit OS. Could that be the problem?

2) I did update the Android tools: Eclipse, SDK and Java before making this new app version. Could that be the problem?

3) I also tried running

jarsigner -verify -verbose -certs

on the old version of the app that is on Google Play and the new app and the certificate valid times are the same.

4) I created the new APK both manually and by using Export Android Application in Eclipse.

5) Manually I created the APK by within Eclipse using `

Android Tools -> Export Unsigned Application and then using
jarsigner -verbose -keystore mykeystore.keystore app.apk companyName
/Developer/android-sdk-mac_86/tools/zipalign -v 4 app.apk app_aligned.apk

So I don't think the problem is that I am using the wrong keystore. I've read that this problem could also be caused by

A) Trying to upload a debug apk instead of a release apk.

B) Having the wrong package name in the manifest.

C) Not incrementing the versionCode and versionName.

Are there other things that could cause this problem besides using the wrong keystone?

James Testa
  • 2,901
  • 4
  • 42
  • 60
  • possible duplicate of [The apk must be signed with the same certificates as the previous version](http://stackoverflow.com/questions/4843212/the-apk-must-be-signed-with-the-same-certificates-as-the-previous-version) – James Black Aug 04 '12 at 19:21
  • You may want to read http://developer.android.com/tools/publishing/app-signing.html, but when you upgraded did you backup your key beforehand? – James Black Aug 04 '12 at 19:22
  • I don't think it is a duplicate question because I have the original keystone. – James Testa Aug 04 '12 at 19:23
  • @ James Black - When you say upgraded did you mean upgrade the Android Tools? What are you referring to as was upgraded? – James Testa Aug 04 '12 at 19:26
  • Even though you fixed it, I meant upgraded your OS. – James Black Aug 05 '12 at 01:37

1 Answers1

1

Well in my case it turns out I was using the wrong keystore. What lead me to realizing this was running

jarsigner -verify -verbose -certs android_app

on the previous and new app and getting a different CERT.RSA filename for each.

So I dug around a bit and found another keystore, which turned out to be the correct one.

James Testa
  • 2,901
  • 4
  • 42
  • 60
  • I have my old keystore, how do I sign it using that instead of the wrong one? I don't see the option on Eclipse. – thisisdee Aug 08 '13 at 15:05