简体   繁体   English

卸载和重新安装 APK 后 Xamarin 表单“未安装应用程序”错误

[英]Xamarin Forms “App Not Installed” Error After Uninstall & Reinstall of APK

I have built an APK of an Android app which I created with Xamarin Forms.我已经构建了一个使用 Xamarin Forms 创建的 Android 应用程序的 APK。 The APK works perfectly, but if I uninstall it and reinstall it, I get an error message "App Not Installed" upon trying to reinstall the APK. APK 运行良好,但如果我卸载它并重新安装它,我在尝试重新安装 APK 时收到错误消息“未安装应用程序”。

If I change the version number / version name and make a new APK, it can be reinstalled again successfully, but this means users can't simply uninstall / reinstall the same version of the app at will.如果我更改版本号/版本名称并制作新的APK,它可以再次成功重新安装,但这意味着用户不能随意卸载/重新安装相同版本的应用程序。 How can I make it so it's possible to uninstall / reinstall the same APK successfully?我如何才能成功卸载/重新安装同一个 APK? Thank you.谢谢你。

I had the same problem, and I found the solution here .我遇到了同样的问题,我在这里找到了解决方案。 Basically, Play Protect will not enable you to reinstall, even if it prompts you again.基本上,Play Protect 不会让您重新安装,即使它再次提示您。 Disabling Play Protect solved it for me.禁用 Play Protect 为我解决了这个问题。

The solution from here worked for me: 这里的解决方案对我有用:

  1. First change your build type to Release from debug.首先将您的构建类型更改为从调试中发布
  2. Clean Solution清洁溶液
  3. Rebuild Solution重建解决方案
  4. Right click your android project and click on archive右键单击您的 android 项目,然后单击存档
  5. After successful archive click on Distribute and click on Ad-hoc成功存档后,单击分发,然后单击临时
  6. Create keystore file创建密钥库文件
  7. After finishing click on Open Distribution完成后点击 Open Distribution
  8. Your apk file is ready.您的 apk 文件已准备就绪。

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

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