Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 771
James Testa Avatar asked Nov 14 '22 01:11

James Testa


1 Answers

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.

like image 65
James Testa Avatar answered Jan 10 '23 19:01

James Testa