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".
This is the command to uninstall the app from device using adb:
Since the verification is based on package's name, you can change the package name inside your config.xml or manifest file for another name you want.
When publishing your app don't forget to change back the name!
I had the same problem until I realised I had the simulator running and adb was trying to install on that
I got this error even after uninstalling the original APK, which was mystifying. Finally I realized that I had set up multiple users on my Nexus 7 for testing and that the app was still installed for one of the other users. Once I uninstalled it for all users the error went away.
I had this problem trying to execute gradle task
connectedDebugAndoidTest
(orconnectedAndroidTest
) on Genymotion. Running it on normal emulator solved the problem.Just delete the old build from the device and reinstall the same. Because device.keystore is already exist in the device so just uninstall the build and reinstall the APK thats all..
Thanks