INSTALL_FAILED_UPDATE_INCOMPATIBLE:程序包签名与以前安装的版本不匹配;忽略 [英] INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package signatures do not match the previously installed version; ignoring
问题描述
尝试生成调试apk以直接在设备(Android-React Native)上直接更新应用程序时收到此错误:
I get this error when trying generate a debug apk for update an app directly on the device (Android - React Native):
任务':app:installDebug'的执行失败.
Execution failed for task ':app:installDebug'.
com.android.builder.testing.api.DeviceException:com.android.ddmlib.InstallException:无法完成会话: INSTALL_FAILED_UPDATE_INCOMPATIBLE:打包prensa.com签名即可 与先前安装的版本不匹配;忽略!
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!
确保版本代码和版本名称已递增,并且程序包名称相同.
Im sure that version code and version name were incremented and the package name is the same.
此外,密钥库和其他密钥与以前使用的相同.
Also, the keystore and other keys are same used before.
错误在哪里?
推荐答案
我今天遇到了同样的错误.我发现了这个http://blog.bihe0832.com/android-v2-issue.html
.它是中文的.要点描述如下:
I met the same error today.And I found thishttp://blog.bihe0832.com/android-v2-issue.html
.It's in Chinese.The key points describe below:
将apk文件打包后,将其解压缩,然后检查文件 META-INF/ANY-NAME.SF.I使用
jarsigner
命令行签署apk 我发现在执行时,alias
放在jar文件之后jarsigner
将用作ANY-NAME
.然后打开ANY-NAME.SF 您找到了X-Android-APK-Signed: 2
行,这就是 错误.请退出您的apk,如果代码行消失了,则apk将为 安装成功.
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.
这篇关于INSTALL_FAILED_UPDATE_INCOMPATIBLE:程序包签名与以前安装的版本不匹配;忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!