Google Maps v2 Monodeid - LinkAssemblies task completes unexpectedly

I am making an application in monodroid using the new Google Maps v2. I created a binding for the Google Play Service and used it. Everything works fine when I'm in debug mode, but in the release I get the following error:

System.Exception: The "LinkAssemblies" task failed unexpectedly. Mono.Cecil.ResolutionException: Failed to resolve Android.App.Fragment at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference) at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference) 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(LinkContextcontext) at Mono.Linker.Pipeline.Process(LinkContext context) at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context) at Xamarin.Android.Tasks.LinkAssemblies.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execue() at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() 

If I remove the binding and the Google Play Services map, it will work.

Anyone who can help?

EDIT: I found a solution: set the link to none. But I would like him to work on installing links only to the "SDK builds", because now the apk file is getting large.

+6
source share
1 answer

The most common reason for this error message is if you use the wrong target versions of the Android SDK, as described in this article: https://kb.xamarin.com/customer/en/portal/articles/1902736-why-does-my-android -build-fail-with-error-executing-task-linkassemblies-error-xa2006-

To fix this, you need to upgrade to the correct goals, which are shown here: https://developer.xamarin.com/guides/xamarin-forms/getting-started/installation/#Android

In addition, Xamarin.Android is updated from time to time; these goals can also be updated, so even if you install the correct version of today, if you are updating later, you may have to update them again along the way.

(PS Although this guide applies to Xamarin.Forms, these goals are inherited from the basic Xamarin.Android tool, so these settings should usually be the same even if you are not actually using Forms, but just Xamarin. Android.)

0
source

Source: https://habr.com/ru/post/952230/


All Articles