xamarin 如何在Visual Studio for Mac on Android项目中将“EmbedAssembliesIntoApk”MSBuild属性设置为“true”?

oyt4ldly  于 2023-06-27  发布在  Mac
关注(0)|答案(3)|浏览(355)

我在我的Android项目中有一个问题,并希望将EmbedAssembliesIntoApk设置为true?
错误是:

error XA0130: 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'.

从哪里可以将EmbedAssembliesIntoApk设置为true?

ncgqoxb0

ncgqoxb01#

从你的错误消息中,你可以看看快速部署,快速部署通过进一步缩小Android应用程序包的大小来工作。
要清除此错误信息,有两种方法,一种是双击Android项目属性--选择Android选项---禁用使用快速开发(仅限调试模式)
默认情况下启用快速部署,在调试版本中可以通过将$(EmbedAssembliesIntoApk)属性设置为True来禁用快速部署。
另一种方法是转到csproj文件,尝试将<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>放置在Debug配置PropertyGroup
关于进入csproj文件,可以看一下:
How to find open Xamarin Android or iOS csproj file in Visual Studio Solution Explorer

58wvjzkj

58wvjzkj2#

我从Visual Studio for Mac部署到设备时遇到了同样的问题。在部署过程中,它只显示“快速部署”消息,永远不会结束。在项目选项中,禁用了快速部署,但我添加了
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>直接在csproj和它解决了它。现在它部署得真快。

vc6uscn9

vc6uscn93#

在毛伊岛项目点击右键,然后选择属性在最后
展开Android,然后选择选项,转到快速部署,然后取消选中所有

相关问题