问题描述
相同的Android项目内置在调试模式下,有时使用Eclipse,有时使用ant(在构建机器上)。如果我第一次安装ant构建,然后尝试启动Eclipse调试,Eclipse控制台显示
如果我这样做方法,即使用Eclipse调试(包括安装apk),然后尝试从命令行安装蚂蚁构建,我得到:
我的证书/签名有什么问题?
问题是, apk文件(在Eclipse和ant构建期间)已使用不同的证书签名。要使签名在不同机器上构建的构建之间保持一致,请将调试密钥库放在版本控制中:
- 使用keytool-importkeypair使钥匙/证书对:
- 将创建的密钥库文件放在版本控制中
- 将Eclipse设置为使用该文件:Windows>首选项> Android> Build
- 设置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
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:
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:
- 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.
这篇关于在adb安装上INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!