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

Roman Pristinsky 46 Reputation points
2021-07-23T09:38:23.717+00:00

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?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,348 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 75,431 Reputation points Microsoft Vendor
    2021-07-26T09:13:18.697+00:00

    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.