amay077 / Xamarin.Forms.GoogleMaps

Map library for Xamarin.Forms using Google maps API
https://www.nuget.org/packages/Xamarin.Forms.GoogleMaps/
MIT License
546 stars 346 forks source link

build with link SDK Assemblies Fails #635

Open mIrOz112 opened 5 years ago

mIrOz112 commented 5 years ago

VERSIONS

PLATFORMS

ACTUAL BEHAVIOR

I'm trying to create a signed .apk file with linking option "SDK Assemblies Only" it couldn;t continue and create this issue below.

ACTUAL SCREENSHOTS/STACKTRACE

Severity    Code    Description Project File    Line    Suppression State
Error       The "LinkAssemblies" task failed unexpectedly.
Mono.Linker.MarkException: Error processing method: 'System.Void Xamarin.Forms.GoogleMaps.Logics.Android.PolygonLogic/<>c::<CreateNativeItem>b__3_1(Xamarin.Forms.GoogleMaps.Polygon,System.Collections.Specialized.NotifyCollectionChangedEventArgs)' in assembly: 'Xamarin.Forms.GoogleMaps.Android.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Android.Gms.Maps.Model.Polygon::SetHoles(System.Collections.Generic.IList`1<System.Collections.Generic.IList`1<Android.Gms.Maps.Model.LatLng>>)
   at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
   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()
   --- End of inner exception stack trace ---
   at Mono.Linker.Steps.MarkStep.ProcessQueue()
   at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
   at Mono.Linker.Steps.MarkStep.Process()
   at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
   at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
   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() QueingSystemMobile.Android          

EXPECTED BEHAVIOR

When I try to build the android project using the Release configuration, it should create a package to be able to create an archive to have a signed .apk file.

HOW TO REPRODUCE

  1. Project Configuration : Release.
  2. Project Properties > Linker Properties > Linking : SDK Assemblies Only
  3. Build
amay077 commented 5 years ago

XFGoogleMapsSample is already setted to SDK Assemblies Only. But I can not reproduce it.

image

Could you reproduce in XFGoogleMapsSample?