Error after migrating to Android.X

Jassim Al Rahma 1,566 Reputation points
2021-06-13T21:36:12.427+00:00

Hi,

I have migrated my app to Android.X and started getting below error when trying to Release my app but I have no issue when running it on Debug mode.

Kindly advice...

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Legacy.targets(5,5): Error XALNK7000: Mono.Linker.MarkException: Error processing method: 'System.Void Xamarin.Forms.Platform.Android.AppLinks.AndroidAppLinks/AndroidActionSuccessListener::<OnSuccess>b__3_0(System.Object,System.ComponentModel.PropertyChangedEventArgs)' in assembly: 'Xamarin.Forms.Platform.Android.AppLinks.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve Firebase.AppIndexing.FirebaseUserActions Firebase.AppIndexing.FirebaseUserActions::get_Instance()
at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod (Mono.Cecil.MethodReference reference) [0x00013] in <b530809e16f547cf90da08b89a069e36>:0
at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference reference) [0x00049] in <b530809e16f547cf90da08b89a069e36>:0
at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00040] in <b530809e16f547cf90da08b89a069e36>:0
at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x000c2] in <b530809e16f547cf90da08b89a069e36>:0
at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x001b1] in <b530809e16f547cf90da08b89a069e36>:0
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x0001b] in <b530809e16f547cf90da08b89a069e36>:0
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00047] in <b530809e16f547cf90da08b89a069e36>:0
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue () [0x0000a] in <b530809e16f547cf90da08b89a069e36>:0
at Mono.Linker.Steps.MarkStep.Process () [0x000f6] in <b530809e16f547cf90da08b89a069e36>:0
at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x0000d] in <b530809e16f547cf90da08b89a069e36>:0
at MonoDroid.Tuner.MonoDroidMarkStep.Process (Mono.Linker.LinkContext context) [0x0000b] in <b530809e16f547cf90da08b89a069e36>:0
at Mono.Linker.Pipeline.ProcessStep (Mono.Linker.LinkContext context, Mono.Linker.Steps.IStep step) [0x0000d] in <b530809e16f547cf90da08b89a069e36>:0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x0000f] in <b530809e16f547cf90da08b89a069e36>:0
at MonoDroid.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline, Mono.Linker.LinkContext context) [0x00000] in <b530809e16f547cf90da08b89a069e36>:0
at MonoDroid.Tuner.Linker.Process (MonoDroid.Tuner.LinkerOptions options, Mono.Linker.ILogger logger, Mono.Linker.LinkContext& context) [0x00071] in <b530809e16f547cf90da08b89a069e36>:0
at Xamarin.Android.Tasks.LinkAssemblies.Execute (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver res) [0x0018f] in <b530809e16f547cf90da08b89a069e36>:0
at Xamarin.Android.Tasks.LinkAssemblies.RunTask () [0x0001b] in <b530809e16f547cf90da08b89a069e36>:0
at Microsoft.Android.Build.Tasks.AndroidTask.Execute () [0x00000] in /Users/builder/azdo/_work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:17 (XALNK7000) (Angels.Android)

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

1 answer

Sort by: Most helpful
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 74,486 Reputation points Microsoft Vendor
    2021-06-14T02:23:33.677+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    What your linker settings? Please change it to None, then release it, if you will get the same exception.

    Then please share Android option screenshot that contains all the settings when release.

    Best Regards,

    Leon Lu


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

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

    1 person found this answer 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.