question

RomanPristinsky-1428 avatar image
0 Votes"
RomanPristinsky-1428 asked LeonLu-MSFT answered

After upgrading Xamarin.Forms library to version 5.0.0.2083 and AndroidX libraries 1.6, my program gets compile error.

Hello!

Yesterday I updated the libraries Xamarin.Forms and AndroidX libraries to versions 5.0.0.2083 and 1.6 accordingly, including Google.Android.Material up to 1.4. When compiling my application, I began to receive an error message:

Mono.Linker.MarkException: Error processing method: 'System.Boolean Xamarin.Forms.Platform.Android.ShellItemRenderer::Google.Android.Material.BottomNavigation.BottomNavigationView.IOnNavigationItemSelectedListener.OnNavigationItemSelected(Android.Views.IMenuItem)' in assembly: 'Xamarin.Forms.Platform.Android.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Boolean Google.Android.Material.BottomNavigation.BottomNavigationView/IOnNavigationItemSelectedListener::OnNavigationItemSelected(Android.Views.IMenuItem)
in Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
in Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
in Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
in Mono.Linker.Steps.MarkStep.ProcessQueue()
--- End of trace inner exceptions ---
in Mono.Linker.Steps.MarkStep.ProcessQueue()
in Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
in Mono.Linker.Steps.MarkStep.Process()
in Mono.Linker.Steps.MarkStep.Process(LinkContext context)
in MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
in Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
in Mono.Linker.Pipeline.Process(LinkContext context)
in MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
in Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
in Xamarin.Android.Tasks.LinkAssemblies.RunTask()
in Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/builder/azdo/_work/2/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:row 17

Got rid of the bug by downgrading the Google.Android.Material library from 1.4 to 1.3.0.1.
Is this a bug of Google.Android.Material version 1.4?

dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LeonLu-MSFT avatar image
0 Votes"
LeonLu-MSFT answered

Hello,​

Welcome to our Microsoft Q&A platform!

Is this a bug of Google.Android.Material version 1.4?

No

Please open the Xamarin.Forms nuget packages(version 5.0.0.2083).

117828-image.png


Google.Android.Material' version should be >=1.2.1.1 && <1.3.0



Best Regards,

Leon Lu



If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (50.8 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.