How to deal with INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES without uninstall?
I tried to reinstall an apk
$adb install -r new.apk
And it shows the error:
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
One solution is to uninstall and install the new.apk, that works fine.
But I'm wondering whether I could re-build an apk and re-install without the uninstallation. Eg. change some config in the AndroidManifest.xml, or not sign the APK, etc.
It would be great appreciated if you could tell me the whole meaning of the "INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES".
It means the new copy of your application (on your development machine) was signed with a different signing key than the old copy of your application (installed on the device/emulator). For example, if this is a device, you might have put the old copy on from a different development machine (e.g., some other developer's machine). Or, the old one is signed with your production key and the new one is signed with your debug key.
I ran into this while testing on a new Xoom. I had previously installed my app from the Marketplace. Later while trying to test a new version of the app I ran into this error.
I fixed it by removing the app that was installed via Marketplace (just hold and drag to the trash). Thereafter I was able to deploy my development version without any issue.
This happened to me when another developer on the team built our app on the hardware device I was trying to deploy to. Uninstalling the app from hardware fixed my problem.