1

I have already published 5 updates for my application without any problems. Now, when trying to install an update for testing purposes the installation fails. Through the regular Android package installer I get the error "Application not installed."

When trying to install the application through adb I get the error: [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]

I know for a fact that the certificate is the same one I've used to sign the app before.

I have also incremented the versionName and versionCode accordingly in the Manifest file.

The only thing that has changed since my last update is that my hard drive crapped-out on me, which led to re-installing eclipse, ADT, Android SDK, and Java. I basically had to set up the entire development environment again after the crash.

Everything, including all of my project files, were backed-up. I can build my application just fine.

Installation works if I uninstall the previous version first, but this is an update for an app that I currently have published. I can't ask the users to uninstall whatever version they currently are using to take an update. That sounds silly.

Any ideas would be helpful.

dell116
  • 5,835
  • 9
  • 52
  • 70
  • What is ``the regular Android package installer``? If you mean running/installing directly from Eclipse it signs package with developer/debug key only. If you're using export signed package tool, and uploading package to device manually, well, quite interesting. – harism Dec 31 '11 at 01:44
  • harism is correct. If you lost everything on your development machine, you also lost the debug.keystore. All "debug" installs of your application are now orphans. You will need to uninstall these debug versions, to reinstall with the new debug.keystore. – eyespyus Dec 31 '11 at 15:07
  • For lack of a better term, the "regular android package installer" I was referring to is the one that your everyday average user would get when installing an app from the market / opening an apk file from a file explorer on a device. Thanks for your efforts / thoughts. This was human error on my part. – dell116 Dec 31 '11 at 17:24

1 Answers1

5

I think you need double confirm whether you use the same certificate or not since we ran into the same scenarios many many times and the root causes are always the same: the certificate changes.

you could simply unzip the .apk file since it is just a regular ZIP package and then locate the file META-INF/CERT.RSA. the CERT.RSA should NOT be changed in all your .APK files. to confirm, decrpt it as following:

openssl pkcs7 -inform des -in CERT.RSA -out decrypted.txt -print_certs -text

and you could simply run diff on the .txt files.

chyou
  • 126
  • 1
  • As it turns out, it wasn't the same keystore. Don't ask me how this new keystore got in my project folder. I went to a backup from months ago and used that keystore and everything is ok. Time is money people, keep your files in order! – dell116 Dec 31 '11 at 17:21