如何修复“签名不匹配先前安装的版本”错误?

发布于 2025-01-21 07:07:44 字数 1066 浏览 0 评论 0原文

首先,我已经从华为平板电脑设备上卸载了此应用程序。

现在,我想使用Mac中的ADB命令行重新安装APK。

./adb install ~/myapp.apk

我有一个错误:

Performing Streamed Install
adb: failed to install myapp.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.example.myapp signatures do not match previously installed version; ignoring!]

浏览,我了解到该应用程序也许没有正确卸载。所以我使用ADB外壳。

$./adb shell

Device:/$ pm uninstall com.example.myapp
Failure [DELETE_FAILED_INTERNAL_ERROR]

Device:/$ pm uninstall --user 0 com.example.myapp
Failure [not installed for 0]

Device:/$ pm list package | grep myapp
(empty result)

Device:/$ pm list package | grep google
package:com.google.android.inputmethod.latin // which means list package & grep working fine

Device:/$ pm list package -u | grep myapp
package:com.example.myapp // which means pm already acknowledge myapp is uninstalled

所以在这一刻,我不知所措。甚至ADB Shell也看不到应用程序包。但是,当我尝试安装APK时,我会收到上面的错误。我该如何解决?

First, I have already uninstalled this app from my Huawei tablet device.

Now, I want to reinstall the APK with same package name using adb command line from my Mac.

./adb install ~/myapp.apk

I got this error:

Performing Streamed Install
adb: failed to install myapp.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.example.myapp signatures do not match previously installed version; ignoring!]

From browsing around, I learn that perhaps the app did not uninstalled correctly. So I use adb shell.

$./adb shell

Device:/$ pm uninstall com.example.myapp
Failure [DELETE_FAILED_INTERNAL_ERROR]

Device:/$ pm uninstall --user 0 com.example.myapp
Failure [not installed for 0]

Device:/$ pm list package | grep myapp
(empty result)

Device:/$ pm list package | grep google
package:com.google.android.inputmethod.latin // which means list package & grep working fine

Device:/$ pm list package -u | grep myapp
package:com.example.myapp // which means pm already acknowledge myapp is uninstalled

So at this moment, I'm at loss. Even adb shell cannot see the app package. But still, when I try to install the APK, I get the error above. How can I resolve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

戏剧牡丹亭 2025-01-28 07:07:44

当您在设备上有DEV版本并尝试从Play(或相反的方式)安装版本时,就会发生这种情况。可以预期,随着Play用另一个键辞职,您可以在应用程序完整性页面上的“ Play Signing”选项卡下找到。

在尝试加载Play版本之前,您只需要从设备中删除开发版本即可。

That happens when you have a dev version on the device and try and install a version from Play (or the other way around). It is to be expected as Play resigns the app with another key which you can find under the Play Signing tab on the App Integrity page.

You will just need to remove your dev version from the device before you try and load the Play version.

神经大条 2025-01-28 07:07:44

对于仍然面临这个问题的人们,是的,到目前为止,这个问题仍然无法解决。至少我已经发现了为什么会发生问题的原因,这显然是因为当我删除应用程序时,华为问我是否也想删除该应用程序的数据。我回答“不”。而且,一旦回答“否”,由于设备上的应用程序数据的残留物,您将永远无法再次将该应用程序重新安装在该设备上。而且我尽了最大的努力来消除任何残留物,但我仍然无法重新安装该应用程序。

仅一种治疗方法:重置出厂设置。我这样做了,现在我可以重新安装该应用程序。当然,这意味着数据将丢失。但是至少有一个华为备份应用程序,所以有一个。

For people still facing this issue, yes this issue is still unresolvable to this date. At least I have found out why the issue happens, which is apparently because when I remove an app, Huawei asks whether I would also want to remove the app's data or not. I answer "no". And once you answer "no", you'll never be able to reinstall that app on that device ever again, because of the residue of the app data on your device. And I have tried my best to remove any residue by any means, I still cannot reinstall the app.

Only one cure works: reset factory settings. I did this and now I can reinstall the app. Of course, that means the data will be lost. But at least there's a Huawei backup app, so there's that.

以可爱出名 2025-01-28 07:07:44

删除 - 用户0为我工作

removing --user 0 worked for me

嘿嘿嘿 2025-01-28 07:07:44

只需使用ADB外壳删除应用程序

adb shell pm uninstall APP.PACKAGE.NAME

Just remove the app using the adb shell

adb shell pm uninstall APP.PACKAGE.NAME
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文