xamarin.android 调试时出现部署出错(There were deployment errors.Continue?)
作者:互联网
xamarin.android调试时遇到 下述情况
详细信息如下:
Build started...
1>------ Build started: Project: XAndoridVm, Configuration: Debug Any CPU ------
1>C:\Users\ZX\source\repos\XAndoridVm\XAndoridVm\Properties\AndroidManifest.xml : warning XA4211: AndroidManifest.xml //uses-sdk/@android:targetSdkVersion '30' is less than $(TargetFrameworkVersion) ''. Using API-31 for ACW compilation.
1> XAndoridVm -> C:\Users\zx\source\repos\XAndoridVm\XAndoridVm\bin\Debug\XAndoridVm.dll
1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\Android\Xamarin.Android.Legacy.targets(315,5): warning XA0122: Assembly 'Xamarin.Android.Support.Annotations' is using a deprecated attribute '[assembly: Java.Interop.DoNotPackageAttribute]'. Use a newer version of this NuGet package or notify the library author.
2>Starting deployment to OPPO PCRT00 ...
2>Deploying to OPPO PCRT00 ...
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
看了下上述的详细报错信息,怀疑是编译版本有问题,从第一条黄色信息看应该是目标版本可能高了(编译时使用的目标版本是12)。于是决定将编译目标版本调低看看……如下为调整地方。
将目标版本调整为android 9之后,测试成功。
标签:xamarin,errors,...,Xamarin,Build,版本,deployment,android,XAndoridVm 来源: https://www.cnblogs.com/chengcanghai/p/16277713.html