Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linker error on Android #79

Open
dmanning23 opened this issue Oct 13, 2021 · 2 comments
Open

Linker error on Android #79

dmanning23 opened this issue Oct 13, 2021 · 2 comments

Comments

@dmanning23
Copy link

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!

@Abou226
Copy link

Abou226 commented Dec 16, 2021

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

@Abou226
Copy link

Abou226 commented Dec 29, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants