這次事件的原因源於想要雙人去Build同一份Android專案,然後把Apk發佈出去安裝。
但是這樣會發生衝突
即便是使用adb install
,還是會發生
Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES]
從這一篇How to fix “Install Parse Failed - Inconsistent Certificates” when installing .APK file有提到說:
- Copy the first machine’s debug.keystore file to the second machine. See: How to deal with
INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES
without uninstallation on StackOverflow. - Completely uninstall the application first and then install again. You may have to do this if you don’t have the debug.keystore file for some reason. Perhaps your Jenkins CI build has a different release keystore.
跟網路上的講法幾乎都是一樣,不外乎就是uninstall,但是發佈出去的版本是從bin拿出來用的
也就是說是經由debug.keystore
所產生的。
debug.keystore 路徑
在eclipse下可以在偏好設定->Android->Build看到
在Mac是位於:~/.Android的目錄下
驗證apk
指令:jarsigner -verify x.apk
Sign Apk相關連結: