在xamarin中发布模式时LinkAssemblies错误

时间:2016-06-30 07:10:29

标签: android visual-studio xamarin telerik

Severity    Code    Description Project File    Line    Suppression State
Error       The "LinkAssemblies" task failed unexpectedly.
Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Boolean Android.Support.V7.Widget.RecyclerView/ItemAnimator::AnimateAdd(Android.Support.V7.Widget.RecyclerView/ViewHolder)' (defined in 'Telerik.Xamarin.Android.List, Version=2016.1.324.0, Culture=neutral, PublicKeyToken=null') from 'Telerik.Xamarin.Android.List, Version=2016.1.324.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Boolean Android.Support.V7.Widget.RecyclerView/ItemAnimator::AnimateAdd(Android.Support.V7.Widget.RecyclerView/ViewHolder)
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.<ExecuteInstantiatedTask>d__26.MoveNext()

当我构建发布模式我的应用程序发出此错误时,请帮助我如何解决此问题

1 个答案:

答案 0 :(得分:0)

您可以在项目的选项中找到

一些类似于仅仅链接SDK程序集的Change Linker行为

enter image description here

这可能会解决不确定的尝试