INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES on adb install

前端 未结 7 1060
梦毁少年i
梦毁少年i 2020-12-17 07:46

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 sta

7条回答
  •  独厮守ぢ
    2020-12-17 08:26

    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.

提交回复
热议问题