简体   繁体   English

无法部署到真正的 Android 设备 Xamarin

[英]Cant Deploy To Real Android Device Xamarin

My problem is related to this post Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE] even if app appears to not be installed我的问题与这篇文章有关失败 [INSTALL_FAILED_UPDATE_INCOMPATIBLE] 即使应用程序似乎没有安装

I am not able to deploy my app on a real device it works properly on the emulator , i get deployment error, but nothing in the errors tab.我无法在真实设备上部署我的应用程序,它可以在模拟器上正常工作,我收到部署错误,但错误选项卡中没有任何内容。

This is from build output这是来自构建输出

2>Build succeeded. 2>构建成功。

2>An error occured. 2>发生错误。 See full exception on logs for more details.有关更多详细信息,请参阅日志上的完整异常。

2>The installed package is incompatible. 2>安装的包不兼容。 Please manually uninstall and try again.请手动卸载并重试。

2> 2>

========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ========== ========== Deploy: 0 succeeded, 1 failed, 0 skipped ========== ========== 构建:1 次成功,0 次失败,1 次更新,0 次跳过 ==================== 部署:0成功,1 失败,0 跳过 ==========

even after uninstalling the app i was not able to deploy my app on my real device , other apps install fine thorough VS.即使在卸载应用程序后,我也无法在我的真实设备上部署我的应用程序,其他应用程序也安装了很好的 VS。

There is no specific solution available for this problem , i think the reason is your phone OS doesn't completely uninstall your app, the app signature still lingers on(happens with heavily customized android, in my case its MIUI 8 ).这个问题没有具体的解决方案,我认为原因是你的手机操作系统没有完全卸载你的应用程序,应用程序签名仍然存在(发生在高度定制的安卓系统上,在我的例子中是 MIUI 8)。 I found out using logcat - signatures do not match the previously installed version我发现使用 logcat - 签名与之前安装的版本不匹配

Potential Solution 1: Use Titanium Backup (Requires Root) to remove the app folder completely after uninstalling the app.可能的解决方案 1:卸载应用程序后,使用 Titanium Backup(需要 Root)完全删除应用程序文件夹。

Potential Solution 2: Go to settings and remove the app from there , make sure to use the option uninstall for all users(in MIUI 8 this wasn't available)潜在解决方案 2:转到设置并从那里删除应用程序,确保为所有用户使用卸载选项(在 MIUI 8 中不可用)

Potential Solution 3: Use adb to uninstall your app completely its same as uninstall for all users.可能的解决方案 3:使用 adb 卸载您的应用程序与卸载所有用户完全相同。

adb uninstall yourpackagename

Incase you dont know it check in properties of your android solution.如果您不知道它,请检查您的 android 解决方案的属性。

Another way to find it how to delete an app from adb without knowing it's package name找到它的另一种方法是如何在不知道包名称的情况下从 adb 中删除应用程序

adb root亚行根

Then enter adb shell然后输入adb shell

adb shell亚行外壳

Find out your apps package name:找出您的应用程序包名称:

pm list packages | pm 列出包 | grep "your app name/something related to your app name" grep "您的应用程序名称/与您的应用程序名称相关的内容"

Then use:然后使用:

adb uninstall adb卸载

OR

pm uninstall下午卸载

Potential Solution 4: (Not really a Solution) Change the app package name - wont conflict with the one you have already installed潜在解决方案 4:(不是真正的解决方案)更改应用程序包名称 - 不会与您已经安装的名称冲突

Note:Doing a hard reset of your device should solve the issue obviously.注意:对您的设备进行硬重置应该可以明显解决问题。

In my case 4th option worked, if anyone knows how to remove the previously installed app signature from android please let me know i will update the answer accordingly(probably requires an in-depth knowledge of the file system).在我的情况下,第四个选项有效,如果有人知道如何从 android 中删除以前安装的应用程序签名,请告诉我我会相应地更新答案(可能需要对文件系统有深入的了解)。

There have a Simple hack有一个简单的黑客

  1. if a Brand new application - then simply Change Android Package Name and Deploy from VS如果是全新的应用程序 - 那么只需更改 Android 包名称并从 VS 部署
  2. if already play store publish one - then install app through play store and uninstall.如果已经播放商店发布一个 - 然后通过播放商店安装应用程序并卸载。 then deploy from VS然后从 VS 部署

this Works for me这对我有用

在此处输入图片说明 A quickly solution is by changing the package name in android manifest.一个快速的解决方案是更改 android manifest 中的包名称。

转到真实设备设置->应用程序->所有应用程序,现在卸载所有xamarin和mono包,如果调试应用程序在那里也卸载它并再次运行,这解决了我同样的问题。

I know this is an old question, but it could be due to your build configuration.我知道这是一个老问题,但这可能是由于您的构建配置。 The Release and Debug configurations can and should be different w/r/t manifest entries, etc. I get the ADB0030 error if I try to deploy my Debug configuration. ReleaseDebug配置可以并且应该不同 w/r/t manifest 条目等。如果我尝试部署我的 Debug 配置,我会收到ADB0030错误。 FYI.仅供参考。

I've tried to uninstall app and it has disappeared from Finder.我试图卸载应用程序,但它从 Finder 中消失了。 However I received this error.但是我收到了这个错误。 Then I've used a utility (ie. Service Disabler) and the utility listed the app, then I've uninstalled by using utility's Uninstall menu.然后我使用了一个实用程序(即服务禁用程序)并且该实用程序列出了该应用程序,然后我使用实用程序的卸载菜单进行了卸载。 All gone.都过去了。

If you have this problem, that's simple, if you have an older .apk of your application, then install this .apk, and after you uninstall.如果你有这个问题,那很简单,如果你的应用程序有一个旧的 .apk,然后安装这个 .apk,然后卸载。 This is the simple solution.这是简单的解决方案。

我遇到了同样的问题,我通过在 Windows 10 中禁用勒索软件保护来解决它

I installed the app from Play Store, and then uninstalled from there.我从 Play 商店安装了该应用程序,然后从那里卸载。 This seemed to remove it correctly from the device.这似乎正确地从设备中删除了它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM