Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Building Release Version Fails (The "LinkAssemblies" task failed unexpectedly.)

$
0
0

After adding XLabs' NuGet packages (Core, Platform, Serialization, IoC, Forms, and Forms.Charting), I have been getting the following error when I try to build a release version:

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(5,5): Error MSB4018: The "LinkAssemblies" task failed unexpectedly.
Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Void Android.Widget.AbsListView::SetSelectionFromTop(System.Int32,System.Int32)' (defined in 'Xamarin.Forms.Platform.Android, Version=1.3.2.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Forms.Platform.Android, Version=1.3.2.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Android.Widget.AbsListView::SetSelectionFromTop(System.Int32,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__20.MoveNext() (MSB4018) (MarquetteDataFeed.Droid)

When I hit Go To, I get a piece of code in C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets:

I've tried deleting all the Xlabs NuGet packages, deleting and re-adding the Xamarin.Forms package, and using both the "Link all assemblies" and "Link SDK assemblies only" options in the Android project options. I can build it without linking at all ("Don't link"), but obviously I don't want to do that. It seems that I can't fix my solution even after deleting the Xlabs packages that seemed to cause this issue. My target versions are set to Automatic, and my platform is set to Any CPU.

Can anyone shed some light on this?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>