在Xamarin中构建App时,“链接程序集”任务意外失败

前端之家收集整理的这篇文章主要介绍了在Xamarin中构建App时,“链接程序集”任务意外失败前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在尝试在Xamarin中构建App时遇到以下问题.
为什么会出现,如何解决

Severity Code Description Project File Line Source Suppression State Error

The “Link Assemblies” task Failed unexpectedly.

Xamarin.Android.XamarinAndroidException: error XA2006: Reference to
Metadata item ‘System.Void
Android.Widget.TextView::SetTextAppearance(System.Int32)’ (defined in
‘Xamarin.Forms.Platform.Android,Version=2.0.0.0,Culture=neutral,
PublicKeyToken=null’) from ‘Xamarin.Forms.Platform.Android,
Version=2.0.0.0,PublicKeyToken=null’ could not be
resolved. —> Mono.Cecil.ResolutionException: Failed to resolve
System.Void Android.Widget.TextView::SetTextAppearance(System.Int32)

at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.Process()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options,LinkContext&
context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()

—End of inner exception stack trace —

at Xamarin.Android.Diagnostic.Error(Int32 code,Exception innerException,
String message,Object[] args)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at
Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() MyApp.Droid Build

解决方法

在调试模式下尝试此配置

原文链接:https://www.f2er.com/android/310003.html

猜你在找的Android相关文章