Xamarin forms 1.3.0 - Unable to compile in release mode

I get the below build error on upgrading Xamarin forms to 1.3.0, the code complies in debug mode where the linker option is set to no link. We are supporting API level 14 to 21 and compile target is 5.0. Xamarin.GooglePlayservices Lib version is 22.0.0.0

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 'Android.Gms.Maps.Model.Marker Android.Gms.Maps.GoogleMap/InfoWindowClickEventArgs::get_P0()' (defined in 'Xamarin.Forms.Maps.Android, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Forms.Maps.Android, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve Android.Gms.Maps.Model.Marker Android.Gms.Maps.GoogleMap/InfoWindowClickEventArgs::get_P0()
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) (Lifestyle.UI.Droid)

Posts

  • VratislavKalendaVratislavKalenda CZMember
    edited December 2014

    I can confirm this. I have the same configuration. Also, the app crashes when i click the marker popup because in GooglePlayservices Lib version 22 InfoWindowClickEventArgs::get_P0() became InfoWindowClickEventArgs::get_Marker().

    @JasonASmith - Is there any chance for speedy hotfix or workaround?

  • PatGulottaPatGulotta USBeta, University

    I think is another forms 1.3 issue: a new cross platform solution using the VS template, does not compile. The error is:
    The "CompileXaml" task failed unexpectedly.
    System.IO.FileNotFoundException: Could not load file or assembly 'XamlServicesWP,

  • CodeLinguistCodeLinguist ✭✭ USMember ✭✭

    Same issue here. I have a tight schedule for my project. I hope this gets resolved immediately.

  • PatGulottaPatGulotta USBeta, University

    I think i know what may have happened. I think xamarin accidentally pushed out their forms v1.3 alpha/beta version to the stable version. see attached pic.

  • AlessandroFacchini.8463AlessandroFacchini.8463 ✭✭ ITMember ✭✭

    hi apparently compiling in release mode with the no link options the error seems disappearing

    bye

    alessandro

  • ShashankELShashankEL USMember

    @AlessandroFacchini.8881 Yes. But it gives you a very large APK.

  • AlessandroFacchini.8463AlessandroFacchini.8463 ✭✭ ITMember ✭✭

    yes you are right...mine doubled the size

    it can be acceptable until they fix it

    bye Alessandro

  • LuckyDayLuckyDay ✭✭✭ USMember ✭✭✭

    +1. Kinda sucks that everyone took vacation right after a big release. My apk is unacceptably large without linking

  • dsteckdsteck ✭✭ USMember ✭✭

    I had this problem in the prerelease and solved it by updating all of the Android Xamarin assemblies.

    And if you look at the error, I did notice that I had to change my map implementation because the P0 attribute became Marker when I updated the Maps to 1.3.0 stable.

  • LuckyDayLuckyDay ✭✭✭ USMember ✭✭✭
    edited December 2014

    @steckums How did you update the assemblies? I don't have anything available in stable on nuget and the only thing available in prerelease is 1.3.1 which I'm not adopting until updated components are available.

Sign In or Register to comment.