问题描述
我在尝试生成调试APK时会出现此错误以直接在设备上更新应用程序(Android - React Native):
执行失败的任务':app:installdebug'.
com.android.builder.testing.api.deviceexception:com.android.dmlib.instalLexception:无法完成会话: install_failed_update_incompatible:包prensa.com签名 不匹配以前安装的版本;忽略!
我确定版本代码和版本名称递增,包名称是相同的.
此外,密钥库和其他键在之前使用.错误是错误?
推荐答案
我今天遇到了相同的错误.我发现了这个http://blog.bihe0832.com/android-v2-issue.html .it的中文.下面描述的关键点:
如果不删除旧应用程序的某种情况下,如果不删除旧应用程序,则不会删除.包裹您的apk文件后,解压缩,检查文件 Meta-Inf/Any-name.sf.i签署带有jarsigner命令行的apk 工具.我发现jar文件后的alias putted jarsigner,将用作ANY-NAME.然后打开任何名称.sf,if 你发现了一行X-Android-APK-Signed: 2,这是原因 ERROR.RESIGN您的APK,如果代码的行消失,APK将是 安装成功.
尝试:
adb uninstall "com.yourapp.yourapp"
其他推荐答案
确保您知道adb正在处理哪个设备.
我有多个设备可用.我无法理解为什么卸载我的模拟器没有摆脱邮件.事实证明,我的硬件手机已插入计算机充电,也有USB调试启用,令人困惑的adb.
在我的硬件电话上禁用USB调试,并在模拟器上卸载应用程序进行排序.
问题描述
I get this error when trying generate a debug apk for update an app directly on the device (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!
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.
Where is the error?
推荐答案
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:
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.
其他推荐答案
Just in case if somehow your old application is not removed 100% or its data is not removed.
Try:
adb uninstall "com.yourapp.yourapp"
其他推荐答案
Make sure you know which device adb is dealing with.
I had multiple devices available. I couldn't understand why uninstalling on my emulator didn't get rid of the message. It turned out that my hardware phone was plugged into the computer to charge, and also had USB debugging enabled which was confusing adb.
Disabling USB debugging on my hardware phone, and uninstalling the app on the emulator got it sorted.