How to deal with INSTALL_PARSE_FAILED_INCONSISTENT

2019-01-02 17:32发布

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".

标签: android
15条回答
初与友歌
2楼-- · 2019-01-02 17:36

This is the command to uninstall the app from device using adb:

adb uninstall <package name>
查看更多
梦该遗忘
3楼-- · 2019-01-02 17:38

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!

查看更多
看淡一切
4楼-- · 2019-01-02 17:39

I had the same problem until I realised I had the simulator running and adb was trying to install on that

查看更多
无色无味的生活
5楼-- · 2019-01-02 17:40

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.

查看更多
旧人旧事旧时光
6楼-- · 2019-01-02 17:44

I had this problem trying to execute gradle task connectedDebugAndoidTest (or connectedAndroidTest) on Genymotion. Running it on normal emulator solved the problem.

查看更多
墨雨无痕
7楼-- · 2019-01-02 17:45

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

查看更多
登录 后发表回答