简体   繁体   English

Xamarin.Forms:Visual Studio 升级后的部署问题

[英]Xamarin.Forms: deployment issue after Visual Studio upgrade

After upgrading Visual Studio Professional 2019 to version 16.9.2, when I try to deploy on Android Emulator api 28 (9.0), I get following error:将 Visual Studio Professional 2019 升级到版本 16.9.2 后,当我尝试在 Android 模拟器 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'.

Before the upgrade, everything worked fine.在升级之前,一切正常。 This is really frustating!这真是令人沮丧!

To correct this problem I had to为了纠正这个问题,我不得不

  1. uninstall app on Android phone (important step)卸载 Android 手机上的应用程序(重要步骤)
  2. Unload Android Project from solution explorer从解决方案资源管理器中卸载 Android 项目
  3. This brings up the project file code now search code for <EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>这会调出项目文件代码,现在搜索<EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>的代码
  4. Change false to true save将 false 更改为 true 保存
  5. reload project problem solved.重新加载项目问题已解决。

Note leave fast deploy checked.注意选中快速部署。

Go to >> Solution Properties>> Android Options>> Uncheck "Use Fast Deployment(debug mode only)" Go 到 >> 解决方案属性>> Android 选项>> 取消选中“使用快速部署(仅限调试模式)”

I had the same issue recently after adding images to my project found out that I had upper case letters as a name SomePicture.png renaming all images to lower case solved it.在将图像添加到我的项目后发现我有大写字母作为名称 SomePicture.png 将所有图像重命名为小写后,我最近遇到了同样的问题。

@AlwinBrabu, I think you meant "Project Properties" -> Android Options -> Uncheck Fast Deployment(debug mode only). @AlwinBrabu,我认为您的意思是“项目属性”-> Android 选项-> 取消选中快速部署(仅限调试模式)。

This worked for me, although this is a workaround.这对我有用,尽管这是一种解决方法。 I do not consider it a solution.我不认为这是一个解决方案。

To solve this, I had to right-click on the Android project in the Solution Explorer, then in Options -> Android Build uncheck the Fast Assembly Deployment option.为了解决这个问题,我必须在解决方案资源管理器中右键单击 Android 项目,然后在Options -> Android Build中取消选中Fast Assembly Deployment选项。

Then deploy the project on the Android emulator.然后在 Android 仿真器上部署项目。

But after deploying it once, I went back to the settings and checked (ie ticked) the Fast Assembly Deployment option, and subsequent deploys worked fine.但是在部署一次之后,我回到设置并检查(即勾选)快速装配部署选项,随后的部署工作正常。

I'm running Visual Studio for Mac 2022 version 17.0.1 (build 72).我正在运行 Visual Studio for Mac 2022 版本 17.0.1(内部版本 72)。

暂无
暂无

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

相关问题 Xamarin.Forms:Android 问题。重新安装 Visual Studio 2019 后的图形 - Xamarin.Forms : issue with Android.Graphics after reinstall Visual Studio 2019 Visual Studio 编译错误,Xamarin.forms - Visual studio compilation error, Xamarin.forms Xamarin.Forms Visual Studio 2017项目未部署 - Xamarin.Forms Visual Studio 2017 project does not deploy Xamarin.Forms:重新安装 Visual Studio 2019 v 16.11.11 预览版 1.0 后在调试模式下运行程序时出错 - Xamarin.Forms : Error running program in debug mode after reinstalling Visual Studio 2019 v 16.11.11 preview 1.0 使用Xamarin.Forms时,Xamarin.Droid在Visual Studio 2015中导致生成错误 - Xamarin.Droid causing build errors in Visual Studio 2015 when using Xamarin.Forms Xamarin.forms、Android 部署问题。 应用程序无法在模拟器和物理设备上部署 - Xamarin.forms, Android deployment issue. App is failing to Deploy on Emulators and physical devices 从 Xamarin.Forms 从 4.1 升级到 4.2+ 后发生神秘 nullReferenceException - Mystery nullReferenceException occurs after upgrade from Xamarin.Forms from 4.1 to 4.2+ Xamarin.Forms工具栏菜单动画问题 - Xamarin.Forms Toolbar Menu Animation issue 如何在Android设备上调试Visual Studio-Xamarin.Forms项目? - How can I debug Visual Studio - Xamarin.Forms project on Android device? 如何使用Visual Studio 2015对Xamarin.Forms应用程序进行签名和打包? - How can I sign and package Xamarin.Forms application using Visual Studio 2015?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM