GoogleClientPlugin icon indicating copy to clipboard operation
GoogleClientPlugin copied to clipboard

Linker error on Android

Open dmanning23 opened this issue 3 years ago • 2 comments

When trying to build an Android app with the linker enabled, I am getting a linker error:

Severity	Code	Description	Project	File	Line	Suppression State
Error		Mono.Linker.MarkException: Error processing method: 'System.Void Plugin.GoogleClient.GoogleClientManager/<>c__DisplayClass48_0::<OnSignInSuccessful>b__1()' in assembly: 'Plugin.GoogleClient.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.String Android.Gms.Auth.GoogleAuthUtil::GetToken(Android.Content.Context,Android.Accounts.Account,System.String)
   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 Mono.Linker.Steps.MarkStep.Process(LinkContext context)
   at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
   at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
   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.RunTask()
   at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/builder/azdo/_work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 17	ScatterNote.Droid	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Legacy.targets	649	

If I could bypass this issue by just skip linking of the relevant assembly, I'd be happy with that. I've tried a few different things in the "Skip linking assemblies" field of Visual Studio but I keep getting this error.

Thanks for any help. Cheers!

dmanning23 avatar Oct 13 '21 13:10 dmanning23

Same issue with me, has anyone know how to fix this ?

Abou226 avatar Dec 16 '21 05:12 Abou226

Now mine is working. I cloned the repos and make some changes to make it work. But now i have another issue. When i publish the app on playstore. The google login is not working for android 11 and above.

Abou226 avatar Dec 29 '21 04:12 Abou226