Error while building Android App - The "LinkAssemblies" task failed unexpectedly.

Hi there!

I'm trying to build a Xamarin.Forms Android app and the following error appears. Do you have any guess about what could be the problem?

Thanks.

Best regards,

Fernando Costa

Error 205 The "LinkAssemblies" task failed unexpectedly.
Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Void Java.Interop.JavaTypeParametersAttribute::.ctor(System.String[])' (defined in 'Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Java.Interop.JavaTypeParametersAttribute::.ctor(System.String[])
at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkCustomAttribute(CustomAttribute ca)
at Mono.Linker.Steps.MarkStep.MarkCustomAttributes(ICustomAttributeProvider provider)
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.Initialize()
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__20.MoveNext() MoveMe.Droid

Posts

  • Hi,
    We have the exactly same problem when we are trying to add a linker.
    It would be great if somebody from Xamarin can help us because I spent dozens of hours searching this error in the internet.
    Thanks!

Sign In or Register to comment.