首页 > 解决方案 > Xamarin.Forms:Visual Studio 升级后的部署问题

问题描述

将 Visual Studio Professional 2019 升级到版本 16.9.2 后,当我尝试在 Android Emulator api 28 (9.0) 上进行部署时,出现以下错误:

Error XA0130: Sorry. Fast deployment is only supported on devices running Android 5.0 (API level 21) or higher. Please disable fast deployment in the Visual Studio project property pages or edit the project file in a text editor and set the 'EmbedAssembliesIntoApk' MSBuild property to 'true'.

在升级之前,一切正常。这真是令人沮丧!

标签: androidvisual-studioxamarin.forms

解决方案


为了纠正这个问题,我不得不

  1. 在Android手机上卸载应用程序(重要步骤)
  2. 从解决方案资源管理器中卸载 Android 项目
  3. 这将打开项目文件代码现在搜索代码 <EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
  4. 将 false 更改为 true 保存
  5. 重新加载项目问题已解决。

注意选中快速部署。


推荐阅读