ADB“应用程序已安装”尽管未安装该应用程序仍出错
我目前正在尝试将 Unity 项目的 apk 上传到我的 Pixel 3a。我正在使用 ADB,但遇到了有关安装的问题: 当我使用 adb install
时,我收到消息
adb: failed to install testingApp.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.DefaultCompany.com.unity.template.mobile2D signatures do not match previously installed version; ignoring!]
据我所知,这表明手机上已安装该应用程序的某个版本。情况不应该是这样,因为这是我第一次尝试将 apk 上传到我的手机。当我尝试使用 adb uninstall
卸载此“已安装的版本”时,收到消息
失败 [DELETE_FAILED_INTERNAL_ERROR]
我已检查手机上的应用列表,并且在列表中没有找到这个应用程序,在已安装的apk列表中也没有看到它。
有人可以向我解释一下为什么我的手机认为它安装了这个应用程序,尽管它没有安装?
(一点额外的信息可能有用......我之前已经能够在我的手机上安装一个统一的应用程序版本,并且它仍然在设备上,尽管手机没有将其放入 apk 列表中我的应用程序)
I am currently trying to upload an apk for a Unity project to my Pixel 3a. I am using ADB and am running into an issue regarding installation:
When I use adb install <app>
, I get the message
adb: failed to install testingApp.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.DefaultCompany.com.unity.template.mobile2D signatures do not match previously installed version; ignoring!]
From what I know this indicates that a version of the app is already installed on the Phone. This shouldn't be the case, as this is the first time I have tried to upload the apk to my phone. When I attempt to uninstall this "already installed version" using adb uninstall <app>
, I get the message
Failure [DELETE_FAILED_INTERNAL_ERROR]
I have checked the app list on my phone, and have not found this app in the list, nor have I seen it in the list of installed apks.
Can someone please explain to me why my phone thinks it's installed this app even though it hasn't?
(One extra bit of info that might be useful... I've been able to install a unity app build to my phone before, and it is still on the device, although the phone doesn't put it in the apk list of my apps)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以卸载应用程序但保留应用程序数据。在这种情况下,新安装的应用程序必须与已卸载的应用程序具有相同的签名。
根据您收到的错误消息,我认为这是以某种方式发生的,现在它阻止您安装新的应用程序版本。
要忽略现有数据,您可以使用
-r
“替换现有应用程序”选项强制 Android 替换应用程序:如果您可以更改要安装的应用程序的 packageName,则更改它也是一个选项。
It is possible to uninstall an app but keep the app data. In such a case the newly installed app have to have the same signature as the uninstalled app.
Base don the error message you get I would assume that this happend somehow and now it prevents you from installing the new app version.
To ignore the existing data you can force Android to replace the app using
-r
"replace existing application" option:If you can change the packageName of the app to be installed changing it would also be an option.