Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mono.Linker.MarkException: Error processing method: 'System.Void AndroidX.RecyclerView.Widget.RecyclerView/LayoutManager

I am trying to debug my Xamarin project. Framework and all packages are up to date. In iOS it works, but in Android NOT. How can I solve this problem:

Mono.Linker.MarkException: Error processing method: 'System.Void AndroidX.RecyclerView.Widget.RecyclerView/LayoutManager::n_OnInitializeAccessibilityNodeInfo_Landroidx_recyclerview_widget_RecyclerView_Recycler_Landroidx_recyclerview_widget_RecyclerView_State_Landroidx_core_view_accessibility_AccessibilityNodeInfoCompat_(System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr,System.IntPtr)' in assembly: 'Xamarin.AndroidX.RecyclerView.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve AndroidX.Core.View.Accessibiity.AccessibilityNodeInfoCompat    at Mono.Linker.Steps.MarkStep.HandleUnresolvedType(TypeReference reference)    at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)    at MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)    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 Xamarin.Android.Tasks.AndroidTask.Execute()        
like image 597
Kaan Congar Avatar asked Mar 17 '21 09:03

Kaan Congar


2 Answers

I encountered this same problem after updating Visual Studio to 16.9.2 and updating the Android SDK.

The simple solution was to update the 'Xamarin.AndroidX.RecyclerView' Nuget package in the package manager. I Updated to the latest version (v1.1.0.8).

like image 92
Zee Avatar answered Sep 24 '22 17:09

Zee


Same problem but i did not have 'Xamarin.AndroidX.RecyclerView' installed.

Solution: install in android project 'Xamarin.AndroidX.RecyclerView' and all work fine

like image 23
Ricko.. Avatar answered Sep 25 '22 17:09

Ricko..