The same Android project is built in debug mode, sometimes with Eclipse, sometimes with ant (on build machine).
同样的Android项目是在调试模式下构建的,有时使用Eclipse,有时使用ant(在构建机器上)。
If I first install the ant build, and then try to start Eclipse debugging, the Eclipse console displays
如果我首先安装ant build,然后尝试启动Eclipse调试,则会显示Eclipse控制台
[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![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]发布取消!
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:
如果我反过来这样做,即使用Eclipse调试(包括安装apk),然后尝试从命令行安装ant build,我得到:
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
What is wrong with my certificates/signing?
我的证书/签名有什么问题?
7 个解决方案
#1
46
For me the problem was I had the same application already installed with another key. Uninstalling the old application solved the problem, as noted here:
对我来说问题是我已经使用另一个密钥安装了相同的应用程序。卸载旧应用程序解决了这个问题,如下所示:
#2
27
The old installed .apk has different certificate than the new going to be installed or it is already installed in your device with a different key. This means that your application was previously installed from a different machine that gave it different credentials.
旧安装的.apk具有与将要安装的新证书不同的证书,或者已使用不同的密钥安装在您的设备中。这意味着您的应用程序以前是从另一台机器上安装的,它为其提供了不同的凭据。
So the solution is:
所以解决方案是:
uninstall the existing .apk
卸载现有的.apk
and then
re-install the new .apk
重新安装新的.apk
#3
17
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:
问题是apk文件(在Eclipse和ant构建期间)已使用不同的证书进行签名。要使已在不同计算机上构建的构建之间的签名保持一致,请将调试密钥库置于版本控制中:
- Use keytool-importkeypair to make the key/certificate pair: https://*.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://*.com/a/9019925/1097104
使用keytool-importkeypair来创建密钥/证书对:https://*.com/a/4257367/1097104
将创建的密钥库文件放在版本控制中
将Eclipse设置为使用该文件:Windows> Preferences> Android> Build
设置ant属性以使用该文件:https://*.com/a/9019925/1097104
This is handy if you tend to cross-install builds from your own machine and build machine.
如果您倾向于从自己的计算机和构建计算机交叉安装构建,这很方便。
#4
1
Open Eclipse's Preferences. Open Android section in left list. Select "Build" area under Android Beside "Custom debug store" navigate to the keystore under your Android SDK instalation, NOT the one Eclipse has selected under your home directory.
打开Eclipse的首选项。在左侧列表中打开Android部分。选择Android下的“Build”区域在“自定义调试存储”旁边导航到Android SDK安装下的密钥库,而不是Eclipse在您的主目录下选择的密钥库。
Now the android ant build and eclipse are using the same keystore.
现在android ant build和eclipse正在使用相同的密钥库。
#5
1
In IntelliJ although you can select a debug keystore for debug signing your applications you can not enter keystore password or keypassword. You could export your release certificates and import them to your debug keystore and change keystore and key passwords to "android". I have prepared step by step instructions for it: http://www.denizoguz.com/2013/01/12/failure-install_parse_failed_inconsistent_certificates/
在IntelliJ中,虽然您可以选择调试密钥库来对应用程序进行调试签名,但您无法输入密钥库密码或密钥密码。您可以导出发布证书并将其导入调试密钥库,并将密钥库和密钥密码更改为“android”。我已经为它准备了一步一步的说明:http://www.denizoguz.com/2013/01/12/failure-install_parse_failed_inconsistent_certificates/
#6
1
If your building system is gradle, just use the follwong command to uninstall it in Windows:
如果您的构建系统是gradle,只需使用follwong命令在Windows中将其卸载:
.\gradlew.bat uninstallDebug
or in Linux:
或者在Linux中:
./gradlew uninstallDebug
And then:
./gradlew install
This is a certification check for installation and uninstallation on the same package in Android. If you are using two different building PC (computer) connected with the same phone, you'll get this error when you connect your phone with those different PCs. The best choice is binding one PC with one physical phone.
这是Android安装和卸载相同软件包的认证检查。如果您使用与同一部手机连接的两台不同的建筑物PC(计算机),则在将手机与这些不同的PC连接时会出现此错误。最好的选择是将一台PC与一部物理手机绑定。
#7
#1
46
For me the problem was I had the same application already installed with another key. Uninstalling the old application solved the problem, as noted here:
对我来说问题是我已经使用另一个密钥安装了相同的应用程序。卸载旧应用程序解决了这个问题,如下所示:
#2
27
The old installed .apk has different certificate than the new going to be installed or it is already installed in your device with a different key. This means that your application was previously installed from a different machine that gave it different credentials.
旧安装的.apk具有与将要安装的新证书不同的证书,或者已使用不同的密钥安装在您的设备中。这意味着您的应用程序以前是从另一台机器上安装的,它为其提供了不同的凭据。
So the solution is:
所以解决方案是:
uninstall the existing .apk
卸载现有的.apk
and then
re-install the new .apk
重新安装新的.apk
#3
17
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:
问题是apk文件(在Eclipse和ant构建期间)已使用不同的证书进行签名。要使已在不同计算机上构建的构建之间的签名保持一致,请将调试密钥库置于版本控制中:
- Use keytool-importkeypair to make the key/certificate pair: https://*.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://*.com/a/9019925/1097104
使用keytool-importkeypair来创建密钥/证书对:https://*.com/a/4257367/1097104
将创建的密钥库文件放在版本控制中
将Eclipse设置为使用该文件:Windows> Preferences> Android> Build
设置ant属性以使用该文件:https://*.com/a/9019925/1097104
This is handy if you tend to cross-install builds from your own machine and build machine.
如果您倾向于从自己的计算机和构建计算机交叉安装构建,这很方便。
#4
1
Open Eclipse's Preferences. Open Android section in left list. Select "Build" area under Android Beside "Custom debug store" navigate to the keystore under your Android SDK instalation, NOT the one Eclipse has selected under your home directory.
打开Eclipse的首选项。在左侧列表中打开Android部分。选择Android下的“Build”区域在“自定义调试存储”旁边导航到Android SDK安装下的密钥库,而不是Eclipse在您的主目录下选择的密钥库。
Now the android ant build and eclipse are using the same keystore.
现在android ant build和eclipse正在使用相同的密钥库。
#5
1
In IntelliJ although you can select a debug keystore for debug signing your applications you can not enter keystore password or keypassword. You could export your release certificates and import them to your debug keystore and change keystore and key passwords to "android". I have prepared step by step instructions for it: http://www.denizoguz.com/2013/01/12/failure-install_parse_failed_inconsistent_certificates/
在IntelliJ中,虽然您可以选择调试密钥库来对应用程序进行调试签名,但您无法输入密钥库密码或密钥密码。您可以导出发布证书并将其导入调试密钥库,并将密钥库和密钥密码更改为“android”。我已经为它准备了一步一步的说明:http://www.denizoguz.com/2013/01/12/failure-install_parse_failed_inconsistent_certificates/
#6
1
If your building system is gradle, just use the follwong command to uninstall it in Windows:
如果您的构建系统是gradle,只需使用follwong命令在Windows中将其卸载:
.\gradlew.bat uninstallDebug
or in Linux:
或者在Linux中:
./gradlew uninstallDebug
And then:
./gradlew install
This is a certification check for installation and uninstallation on the same package in Android. If you are using two different building PC (computer) connected with the same phone, you'll get this error when you connect your phone with those different PCs. The best choice is binding one PC with one physical phone.
这是Android安装和卸载相同软件包的认证检查。如果您使用与同一部手机连接的两台不同的建筑物PC(计算机),则在将手机与这些不同的PC连接时会出现此错误。最好的选择是将一台PC与一部物理手机绑定。