在adb安装上INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES [英] INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES on adb install

查看:233
本文介绍了在adb安装上INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

相同的Android项目内置在调试模式下,有时使用Eclipse,有时使用ant(在构建机器上)。



如果我第一次安装ant构建,然后尝试启动Eclipse调试,Eclipse控制台显示


[2012-03-20 13:32:26 - myproject]重新安装由于不同的应用程序签名失败。
[2012-03-20 13:32:26 - myproject]您必须对应用程序执行完全卸载。警告:这将删除应用程序数据!

[2012-03-20 13:32:26 - myproject]请在shell中执行adb uninstall com.myproject。
[2012-03-20 13:32:26 - myproject]启动取消!


如果我这样做方法,即使用Eclipse调试(包括安装apk),然后尝试从命令行安装蚂蚁构建,我得到:


失败[INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]


我的证书/签名有什么问题?

解决方案

问题是, apk文件(在Eclipse和ant构建期间)已使用不同的证书签名。要使签名在不同机器上构建的构建之间保持一致,请将调试密钥库放在版本控制中:





如果您倾向于从自己的机器和构建机器交叉安装构建,那么这是很方便的。


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?

解决方案

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:

This is handy if you tend to cross-install builds from your own machine and build machine.

这篇关于在adb安装上INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆