INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES on adb install
Solution 1
The problem is that the apk files (during Eclipse and ant build) have been signed with different certificates. To make the signatures consistent between builds that have been built on different machines, place the debug keystore in version control:
- Use keytool-importkeypair to make the key/certificate pair: https://stackoverflow.com/a/4257367/1097104
- Place the created keystore file in version control
- Set Eclipse to use the file: Windows > Preferences > Android > Build
- Set ant properties to use the file: https://stackoverflow.com/a/9019925/1097104
This is handy if you tend to cross-install builds from your own machine and build machine.
Solution 2
For me the problem was I had the same application already installed with another key. Uninstalling the old application solved the problem, as noted here:
https://stackoverflow.com/a/10280878
Solution 3
The old installed .apk has different certificate than the new going to be installed or it is already installed in your device with a different key. This means that your application was previously installed from a different machine that gave it different credentials.
So the solution is:
uninstall the existing .apk
and then
re-install the new .apk
Solution 4
If your building system is gradle, just use the follwong command to uninstall it in Windows:
.\gradlew.bat uninstallDebug
or in Linux:
./gradlew uninstallDebug
And then:
./gradlew install
This is a certification check for installation and uninstallation on the same package in Android. If you are using two different building PC (computer) connected with the same phone, you'll get this error when you connect your phone with those different PCs. The best choice is binding one PC with one physical phone.
Solution 5
Open Eclipse's Preferences. Open Android section in left list. Select "Build" area under Android Beside "Custom debug store" navigate to the keystore under your Android SDK instalation, NOT the one Eclipse has selected under your home directory.
Now the android ant build and eclipse are using the same keystore.
Juuso Ohtonen
Interests: Android, Python, Continuous integration (Jenkins) Android developer database by their location: http://www.androidtalents.com Some references on Android apps: Word Game http://goo.gl/F86Qnd and the Finnish web site: http://www.sanapeli.net/ Shopping List: https://play.google.com/store/apps/details?id=net.sanapeli.shoppinglist ADB Change Language helper app for developers: https://play.google.com/store/apps/details?id=net.sanapeli.adbchangelanguage Base Converter: https://play.google.com/store/apps/details?id=net.sanapeli.baseconverter Barcode to Price Comparison application (in Finland): https://play.google.com/store/apps/details?id=net.sanapeli.hintavertailu SOreadytohelp
Updated on June 15, 2020Comments
-
Juuso Ohtonen almost 4 years
The same Android project is built in debug mode, sometimes with Eclipse, sometimes with ant (on build machine).
If I first install the ant build, and then try to start Eclipse debugging, the Eclipse console displays
[2012-03-20 13:32:26 - myproject] Re-installation failed due to different application signatures. [2012-03-20 13:32:26 - myproject] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2012-03-20 13:32:26 - myproject] Please execute 'adb uninstall com.myproject' in a shell. [2012-03-20 13:32:26 - myproject] Launch canceled!If I do this the other way around, i.e., debug with Eclipse (includes installing the apk) and then try to install the ant build from command line, I get:
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
What is wrong with my certificates/signing?
-
Andrew Mackenzie almost 12 yearsI have the same problem, but it's on the same machine, project and directory. It's as if ant and eclipse are not using the same (debug) keystore...used to work, but I updated to Android Tools 20 recently.
-
techraf about 8 yearsDoes it have anything to do with the question?
-
Clock ZHONG almost 6 yearstechraf, yes, following the process described here could help you resolve this problem. It's very possible that the INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES is caused by different developing hosts. Using different developing hosts to reinstall the same package will show this error, if so, just uninstall the package first.