-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Bug] Error processing method: 'System.Void AndroidX.Activity.ComponentActivity::.ctor #14989
Comments
Looks like it's linked to #13969 there is a workaround in there, hopefully that works for you while we look at things :) |
@jfversluis thank you. At the moment I solved building the app with Linker Behaviour set to Don't Link. Should I downgrade the AndroidX.Core to 1.3.2.1? |
@gianisimone Do you have a solution to this bug, except setting Linker Behaviour to Don't Link ? |
@egette No unfortunately. My Xamarin Forms project is still suffering from this error. I did not manage to compile my Android solution with Linker Behaviour not set to Don't Link. I keep my packages and Visual Studio updated but the issue is still there. |
I also facing same issue. I have added all required references, but the error "Mono.Linker.MarkException" is still not resolving. It appears that there may be some compatibility issues with interlinked Xamarin libraries. This error occurs when upgrading Android version 13 and only in 'Release' mode, as there are no errors in debug mode. Error Mono.Linker.MarkException: Error processing method: 'System.Void AndroidX.Activity.ComponentActivity::.ctor(System.IntPtr,Android.Runtime.JniHandleOwnership)' in assembly: 'Xamarin.AndroidX.Activity.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve AndroidX.Core.App.IOnMultiWindowModeChangedProvider |
Description
When I try to run my Xamarin Forms application in Release Mode for Android (Linker Behaviour: Link SDK Assemblies only), I get the following linker error:
Expected Behavior
App runs properly
Actual Behavior
I got the error mentioned above
Basic Information
Portable
Xamarin.Forms: 5.0.0.2291
Xamarin.Essentials: 1.7.0
Newtonsoft.Json: 13.0.1
SkiaSharp: 2.80.3
SkiaSharp.Views.Forms: 2.80.3
LiteDB: 5.0.11
Com.Airbnb.Xamarin.Forms.Lottie: 4.0.11
Xamarin.FFImageLoading.Svg.Forms: 2.4.11.982
Xamarin.FFImageLoading: 2.4.11.982
Xamarin.FFImageLoading.Forms: 2.4.11.982
Xamarin.FFImageLoading.Svg: 2.4.11.982
ZXing.Net.Mobile.Forms: 2.4.1
ZXing.Net.Mobile: 2.4.1
Forms9Patch: 2.4.9
Zeroconf: 3.5.11
Plugin.BluetoothLE: 6.3.0.19
Nito.AsyncEx: 5.1.2
Android solution
Xamarin.Forms: 5.0.0.2291
Xamarin.Essentials: 1.7.0
Xamarin.Android.Support.Design" Version="28.0.0.3" />
Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.3" />
Xamarin.Android.Support.v4" Version="28.0.0.3" />
Xamarin.Android.Support.v7.CardView" Version="28.0.0.3
Xamarin.Android.Support.v7.MediaRouter" Version="28.0.0.3
Newtonsoft.Json: 13.0.1
SkiaSharp: 2.80.3
SkiaSharp.Views.Forms: 2.80.3
SkiaSharp.Views: 2.80.3
LiteDB: 5.0.11
Com.Airbnb.Xamarin.Forms.Lottie: 4.0.11
Xamarin.FFImageLoading.Svg.Forms: 2.4.11.982
Xamarin.FFImageLoading.Svg: 2.4.11.982
Xamarin.FFImageLoading.Forms: 2.4.11.982
Xamarin.FFImageLoading: 2.4.11.982
ZXing.Net.Mobile.Forms: 2.4.1
ZXing.Net.Mobile: 2.4.1
Plugin.CurrentActivity: 2.1.0.4
Forms9Patch: 2.4.9
Zeroconf: 3.5.11
Plugin.BluetoothLE: 6.3.0.19
Nito.AsyncEx: 5.1.2
Xamarin.AndroidX.MediaRouter: 1.2.5.2
Xamarin.AndroidX.Palette: 1.0.0.10
Xamarin.AndroidX.Biometric: 1.1.0.6
Xamarin.Firebase.Crashlytics: 118.2.1.3
Xamarin.AndroidX.RecyclerView: 1.2.1.3
Environment
Show/Hide Visual Studio info
Build Logs
See error mentioned in the description
Workaround
The only thing that works for me is to change the Linker Behaviour to Don't Link, which it is not recommended for production builds
The text was updated successfully, but these errors were encountered: