Share via

my project can pass building in debug mode, but error in release mode

钢 屈 371 Reputation points
2021-10-30T14:18:58.187+00:00

my project can pass building in debug mode, but error in release mode.
In release mode, the error below, how to solve it?
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 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
在 Mono.Linker.Steps.MarkStep.HandleUnresolvedType(TypeReference reference)
在 Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
在 MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
在 Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
在 Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
在 Mono.Linker.Steps.MarkStep.ProcessQueue()
--- 内部异常堆栈跟踪的结尾 ---
在 Mono.Linker.Steps.MarkStep.ProcessQueue()
在 Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
在 Mono.Linker.Steps.MarkStep.Process()
在 Mono.Linker.Steps.MarkStep.Process(LinkContext context)
在 MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
在 Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
在 Mono.Linker.Pipeline.Process(LinkContext context)
在 MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
在 Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
在 Xamarin.Android.Tasks.LinkAssemblies.RunTask()
在 Microsoft.Android.Build.Tasks.AndroidTask.Execute() 位置 /Users/builder/azdo/_work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:行号 17 quPlayer.Android

Developer technologies | .NET | Xamarin
{count} vote

Answer accepted by question author
  1. Anonymous
    2021-11-01T09:11:42.85+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    If you set the Linker to None, then release your application, If you will get the same issue. And I find a similar thread in github:https://github.com/xamarin/Xamarin.Forms/issues/13969, You can try to update Xamarin.Forms to the latest stable (v5.0.0.2196) as well.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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