Android INSTALL_FAILED_UPDATE_INCOMPATIBLE 当我尝试在设备上安装编译的 .apk 时
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11891848/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
INSTALL_FAILED_UPDATE_INCOMPATIBLE when I try to install compiled .apk on device
提问by artem
I've compiled Trebuchet launcher from CyanogenMod 9, and trying to install it with adb:
我已经从 CyanogenMod 9 编译了 Trebuchet 启动器,并尝试使用 adb 安装它:
$ adb install out/target/product/generic/system/app/Trebuchet.apk
3986 KB/s (7870141 bytes in 1.928s)
pkg: /data/local/tmp/Trebuchet.apk
Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
I tried on Nexus S with CM9 and Galaxy Nexus with stock JB. Why I'm getting this error?
我用 CM9 和 Galaxy Nexus 用股票 JB 试过 Nexus S。为什么我收到这个错误?
EDIT:In my case I've tried to reinstall systempackage with package manager. That's not supported, so I've got this error. Source of the error may differ in your case.
编辑:就我而言,我尝试使用包管理器重新安装系统包。这不受支持,所以我收到了这个错误。错误的来源可能因您的情况而异。
采纳答案by artem
I just renamed the package and it worked for me.
我刚刚重命名了这个包,它对我有用。
Or if you are using Ionic, you could delete the application and try again, this happens when ionic detects that the app you are deploying is not coming from the same build. It often happen when you change from pc.
或者,如果您正在使用 Ionic,您可以删除该应用程序并重试,当 ionic 检测到您正在部署的应用程序不是来自同一个构建时,就会发生这种情况。当您从PC更改时经常发生这种情况。
回答by Mustafa Güven
it means the application which you want to install is already installed. just remove the old one and try again.
这意味着您要安装的应用程序已经安装。只需删除旧的,然后再试一次。
回答by einverne
Try
尝试
adb uninstall package-name
It works for me. I have remove my app using Titanium Backup. However,I think Titanium backup didn't removed my app totally.
这个对我有用。我已经使用 Titanium Backup 删除了我的应用程序。但是,我认为 Titanium 备份并没有完全删除我的应用程序。
回答by Jorgesys
Uninstalling the application would be enough to avoid this problem.
卸载应用程序就足以避免这个问题。
INSTALL_FAILED_UPDATE_INCOMPATIBLE
but sometimes even uninstalling the message is raised again, it occurs in Android OS 5.0 +, so this is the solution:
但有时甚至会再次出现卸载消息,它发生在 Android OS 5.0 + 中,所以这是解决方案:
Go to Settings
> Apps
and you will find your app with the message:
转到Settings
> Apps
,您将找到带有以下消息的应用:
We have to uninstall manually for all users!, then we can install our compiled application with no problems.
我们必须为所有用户手动卸载!,然后我们可以毫无问题地安装我们编译的应用程序。
Another options:
另一种选择:
- Remove the old application and install again.
Use Android Debug Bridge command:
adb uninstall [PACKAGE NAME]
- 删除旧的应用程序并重新安装。
使用 Android 调试桥命令:
adb 卸载 [包名称]
回答by dharam
Two ways that can be works
两种可行的方法
1:Uninstall app from mobile device manually
1:手动从移动设备卸载应用程序
2:Open command prompt , trace path of adb
and execute following command
2:打开命令提示符,跟踪路径adb
并执行以下命令
adb uninstall your_package_name
回答by user3278378
- go to : your adb folder \sdk\platform-tools\
- type cmd
- type : adb remount on command window
- adb shell
- su
- rm /system/app/YourApp.apk
- Restart your device
- 转到:您的 adb 文件夹 \sdk\platform-tools\
- 输入cmd
- 在命令窗口输入:adb remount
- 亚行外壳
- 苏
- rm /system/app/YourApp.apk
- 重新启动您的设备
回答by Reaz Murshed
The question was why he's getting this error. Uninstalling will solve this problem but in my case, while I was installing the compiled version of the apk, the problem raised. I was trying to build an update for my application. So what I did, I built a signed apk and then tried to install the apk and the apk installed perfectly. So, rather removing the old apk, I had to sign the newer update and then installed it.
问题是他为什么会收到这个错误。卸载将解决这个问题,但在我的情况下,当我安装 apk 的编译版本时,问题出现了。我试图为我的应用程序构建更新。所以我做了什么,我构建了一个签名的apk,然后尝试安装apk,apk安装完美。因此,我不得不对较新的更新进行签名,然后安装它,而不是删除旧的 apk。
回答by neteinstein
This maybe because you have more than one user in your deviceand you've just deleted the app on one (leaving the apk still present for the other(s)).
这可能是因为您的设备中有多个用户,而您刚刚删除了其中一个用户的应用程序(将 apk 保留给其他用户)。
I've deleted in all accounts, and it worked afterwards.
我已经在所有帐户中删除了它,然后它就起作用了。
回答by Pixel
This can happen if you sign your application with a different certificate. You can always use
如果您使用不同的证书签署应用程序,就会发生这种情况。您可以随时使用
adb install -r myapk.apk
to overwrite an existing apk on your device, but you will still get the error if you signed the new apk with a different certificate that of the installed apk.
覆盖设备上现有的 apk,但如果您使用与已安装 apk 不同的证书对新 apk 进行签名,您仍然会收到错误消息。
In that scenario you would need to uninstall the apk from your device before attempting an install. However, this can also impact your application since your original signing may be tied to certain Developor API's, so you may need to update the console with your new credentials.
在这种情况下,您需要在尝试安装之前从设备中卸载 apk。但是,这也会影响您的应用程序,因为您的原始签名可能与某些开发人员 API 相关联,因此您可能需要使用新凭据更新控制台。
回答by Mark Pazon
If your device supports multiple users, you might have to delete the app for each account as well.
如果您的设备支持多个用户,您可能还需要为每个帐户删除该应用程序。
I usually use adb and that does the trick
adb uninstall <your-package-name>
我通常使用 adb 就可以了
adb uninstall <your-package-name>