Xamarin.Android.Crashlytics: Update to latest by Nov 15,2020.. Facing an issue while compiling

Hi,
I had to update my Crashlytics, as they stopped sending Crashlogs post Nov 15th 2020, in the process i'm getting the below error and unable to compile.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Legacy.targets(5,5): Error XALNK7000: Mono.Linker.MarkException: Error processing method: 'System.Void Android.Gms.Common.Apis.GoogleApi::.ctor(Android.App.Activity,Android.Gms.Common.Apis.Api,Java.Lang.Object,Android.Gms.Common.Apis.Internal.IStatusExceptionMapper)' in assembly: 'Xamarin.GooglePlayServices.Base.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve Android.Gms.Common.Apis.Internal.IStatusExceptionMapper
at Mono.Linker.Steps.MarkStep.HandleUnresolvedType (Mono.Cecil.TypeReference reference) [0x00013] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x0002c] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at MonoDroid.Tuner.MonoDroidMarkStep.MarkType (Mono.Cecil.TypeReference reference) [0x00000] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x000c8] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x0001b] in <3e53085892e04b628169d0ea2d9ff8b6>:0
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00047] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue () [0x0000a] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.Process () [0x000f6] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x0000d] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at MonoDroid.Tuner.MonoDroidMarkStep.Process (Mono.Linker.LinkContext context) [0x0000b] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Pipeline.ProcessStep (Mono.Linker.LinkContext context, Mono.Linker.Steps.IStep step) [0x0000d] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x0000f] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at MonoDroid.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline, Mono.Linker.LinkContext context) [0x00000] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at MonoDroid.Tuner.Linker.Process (MonoDroid.Tuner.LinkerOptions options, Mono.Linker.ILogger logger, Mono.Linker.LinkContext& context) [0x00071] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Xamarin.Android.Tasks.LinkAssemblies.Execute (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver res) [0x001dd] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Xamarin.Android.Tasks.LinkAssemblies.RunTask () [0x0001b] in <3e53085892e04b628169d0ea2d9ff8b6>:0
at Xamarin.Android.Tasks.AndroidTask.Execute () [0x00000] in <3e53085892e04b628169d0ea2d9ff8b6>:0 (XALNK7000) (App.Android)
Note : I'm on the latest of all the plugins and Visual Studio For Mac too.
Regards,
Raghavendra
Hi Jarvan,
I'm in a process of upgrading or migrating to newer Xamarin.Firebase.Crashlytics from Xamarin.Android.Crashlytics and thats where i encountered the above issue.
Regards
After migrating to new package, try to empty the bin and obj folders, then restart VS and test again. What's the version of the VS? If it doesn't work, try updating to the lastest stable version.
I'm on VS for Mac 8.8.2(build 41), and thats the latest version. Yeah i tried clearing the 'Obj' & 'Bin' folders too.
But still the issue persists. Is there any proper guide to migrate from older crashlytics to new.
However i followed below link, but no luck
https://github.com/a-imai/XamarinCrashlyticsUpgradeSample
The error seems to related to the reference to Xamarin.GooglePlayServices.Base library, try to install the package. And set the Linker to none.
If it still doesn't work, you could create a new project and copy the code to the new sample for test.
Now i have resolved all the compile time errors by upgrading/downgrading the compatible plugin version.
Say, Xamarin.Firebase.LId 60.1.421.0 etc
Now the code compiles, when i force crash the app the crash logs are not reported.
I can still see 'As of November 16, we are only processing crashes from the Firebase Android SDK 17.0.0+. As a result, you might be seeing no new crashes in your dashboard' :neutral:
What the version of Firebase Crashlytics SDK on your side? Since November 15, 2020, the Fabric SDK and beta versions of the Firebase Crashlytics SDK, will no longer send crashes to your Firebase dashboard. To continue getting crash reports in the Firebase console, make sure your app has the following versions of the Firebase Crashlytics SDK, or newer.
You could google with the keyword as The Firebase Crashlytics SDK is now publicly available! to check the related document.
Thank you Jaravan, I'm aware about the latest release. if you see my previous post i have told i'm referring from the below link. ie https://github.com/a-imai/XamarinCrashlyticsUpgradeSample
Xamarin.Firebase.Crash,ytics(117.1.1)
But when i follow the instruction in above link the code compiles but the crash logs are not reported.
Did you migrate the application to AndroidX? The Firebase Crashlytics SDK uses AndroidX as a dependency, so if your app uses older versions of the App Support Library, first migrate your app to AndroidX. And have you enabled the Crashlytics debug logging? Check the tutorial: https://firebase.google.com/docs/crashlytics/test-implementation?platform=android
If it still doesn't work, you could report the issue to the product team on github. Someone also faced the similar issue on iOS.
My targeted framework is Android 9.0(pie) that is what minimum requirement to install Xamarin.Firebase.Crashlytics.
When try to install the app on device, i got the below logs,
java.lang.NoSuchMethodError: No virtual method get(Ljava/lang/Class;)Ljava/lang/Object; in class Lcom/google/firebase/FirebaseApp; or its super classes (declaration of 'com.google.firebase.FirebaseApp' appears in base.apk)
[AndroidRuntime] at com.google.firebase.crashlytics.FirebaseCrashlytics.getInstance(FirebaseCrashlytics.java:230
By this the app crashes.
Yeah i have reported the issue.But no response as of now
Try to migrate to AndroidX and then test. https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=android#before-you-begin
And for this error, try to disable the multi-dex option.
Sign in to comment
1 answer
Sort by: Most helpful
Xamarin.Firebase.Messaing 120.2.4 was causing the issue. Later updates resolved the error.
Sign in to comment
Activity