INSTALL_FAILED_UPDATE_INCOMPATIBLE:包签名与之前安装的版本不匹配;无视
INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package signatures do not match the previously installed version; ignoring
我在尝试生成调试 apk 以直接在设备上更新应用程序时遇到此错误(Android - React Native):
Execution failed for task ':app:installDebug'.
com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to finalize session :
INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package prensa.com signatures do
not match the previously installed version; ignoring!
我确定版本代码和版本名称递增并且包名称相同。
此外,密钥库和其他密钥与之前使用的相同。
哪里出错了?
我遇到了同样的错误today.And我发现了这个http://blog.bihe0832.com/android-v2-issue.html
。它在Chinese.The下面描述的关键点中:
After package your apk file, unzip it,check the file
META-INF/ANY-NAME.SF.I sign the apk with jarsigner
command line
tool.I found that the alias
putted after the jar-file when exec the
jarsigner
, will used as the ANY-NAME
.Then open the ANY-NAME.SF, if
you found a line of X-Android-APK-Signed: 2
,That's the cause of the
error.Resign your apk,if the line of code gone, the apk will be
installed success.
以防万一您的旧应用程序未被 100% 删除或其数据未被删除。
尝试:
adb uninstall "com.yourapp.yourapp"
确保您知道 adb 正在处理哪个设备。
我有多个设备可用。我不明白为什么在我的模拟器上卸载并没有消除该消息。原来我的硬件phone是插在电脑上充电的,而且还开启了USB调试,这让adb很迷惑。
在我的硬件上禁用 USB 调试 phone,然后在模拟器上卸载应用程序即可解决问题。
我在将 react-native 版本从 0.59.0 升级到 0.59.8 后遇到了这个问题。从设备中手动删除应用程序,然后 运行 react-native run-android
解决了我的问题
INSTALL_FAILED_UPDATE_INCOMPATIBLE
请卸载您以前的 APK 并重新安装更新后的 APK
gradlew clean
npm start -- --reset-cache
react-native run-android
对我来说,这是因为我尝试在已经安装了生产版本的 phone 上安装调试版本。换句话说,安装的应用程序是用 release.keystore 文件签名的,而调试版本是用 debug.keystore 文件签名的。
所以我刚刚卸载了该应用程序,以便它可以安装使用 debug.keystore 文件签名的应用程序。
我在尝试生成调试 apk 以直接在设备上更新应用程序时遇到此错误(Android - React Native):
Execution failed for task ':app:installDebug'.
com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to finalize session : INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package prensa.com signatures do not match the previously installed version; ignoring!
我确定版本代码和版本名称递增并且包名称相同。
此外,密钥库和其他密钥与之前使用的相同。
哪里出错了?
我遇到了同样的错误today.And我发现了这个http://blog.bihe0832.com/android-v2-issue.html
。它在Chinese.The下面描述的关键点中:
After package your apk file, unzip it,check the file META-INF/ANY-NAME.SF.I sign the apk with
jarsigner
command line tool.I found that thealias
putted after the jar-file when exec thejarsigner
, will used as theANY-NAME
.Then open the ANY-NAME.SF, if you found a line ofX-Android-APK-Signed: 2
,That's the cause of the error.Resign your apk,if the line of code gone, the apk will be installed success.
以防万一您的旧应用程序未被 100% 删除或其数据未被删除。
尝试:
adb uninstall "com.yourapp.yourapp"
确保您知道 adb 正在处理哪个设备。
我有多个设备可用。我不明白为什么在我的模拟器上卸载并没有消除该消息。原来我的硬件phone是插在电脑上充电的,而且还开启了USB调试,这让adb很迷惑。
在我的硬件上禁用 USB 调试 phone,然后在模拟器上卸载应用程序即可解决问题。
我在将 react-native 版本从 0.59.0 升级到 0.59.8 后遇到了这个问题。从设备中手动删除应用程序,然后 运行 react-native run-android
解决了我的问题
INSTALL_FAILED_UPDATE_INCOMPATIBLE
请卸载您以前的 APK 并重新安装更新后的 APK
gradlew clean
npm start -- --reset-cache
react-native run-android
对我来说,这是因为我尝试在已经安装了生产版本的 phone 上安装调试版本。换句话说,安装的应用程序是用 release.keystore 文件签名的,而调试版本是用 debug.keystore 文件签名的。
所以我刚刚卸载了该应用程序,以便它可以安装使用 debug.keystore 文件签名的应用程序。