亚行INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES安装 [英] INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES on adb install

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

问题描述

同样的Andr​​oid项目是建在调试模式下,有时使用Eclipse,有时有蚁(构建机器上)。

The same Android project is built in debug mode, sometimes with Eclipse, sometimes with ant (on build machine).

如果我先安装Ant构建,然后再尝试启动Eclipse调试,Eclipse的控制台显示

If I first install the ant build, and then try to start Eclipse debugging, the Eclipse console displays

[2012-03-20十三时32分26秒 - 的myproject]重新安装失败是由于不同的应用程序签名。   [2012-03-20 13点32分26秒 - 的myproject]您必须执行应用程序的完全卸载。警告:这将删除该应用程序的数据
  [2012-03-20 13点32分26秒 - 的myproject]请在shell中执行'亚行卸载com.myproject。   [2012-03-20 13点32分26秒 - 的myproject]!启动取消

[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!

如果我这样做,周围的其他方法,比如,调试与Eclipse(包括安装APK),然后尝试从命令行安装Ant构建,我得到:

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:

失败[INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]

Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]

什么是错我的证书/签名?

What is wrong with my certificates/signing?

推荐答案

问题是,在 APK文件(Eclipse和Ant构建过程中)已经与不同的证书签署。为了使签名一致的构建已建在不同的机器上,将调试密钥库的版本控制:

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:

  • 使用密钥工具 - importkeypair使密钥/证书对: http://stackoverflow.com/a/4257367/1097104
  • 将所创建的密钥库文件中的版本控制
  • 设置Eclipse来使用文件:Windows> preferences>安卓>建立
  • 设置Ant属性使用文件:<一href="http://stackoverflow.com/a/9019925/1097104">http://stackoverflow.com/a/9019925/1097104
  • Use keytool-importkeypair to make the key/certificate pair: http://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: http://stackoverflow.com/a/9019925/1097104

如果你倾向于交叉安装从您自己的计算机建立和建设机械这是很方便的。

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

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

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