GooglePlayServicesComponents icon indicating copy to clipboard operation
GooglePlayServicesComponents copied to clipboard

FirebaseCrash reported as "This class is obsoleted in this android platform"

Open StepanMynarik opened this issue 5 years ago • 5 comments

This is just confusing. How am I supposed to integrate various Firebase services like Crashlytics, Messaging etc.?

Using these libraries or using these libraries?

I assumed that libraries from this repository are the right ones, since the other repository uses Fabric, which is now being deprecated by Google after full integration with Firebase.

Please help, anyone.

StepanMynarik avatar Sep 22 '20 16:09 StepanMynarik

I think those are outdated

https://github.com/xamarin/XamarinComponents/tree/master/Android/Crashlytics

and GPS-FB should be the right one

https://github.com/xamarin/GooglePlayServicesComponents

versions 71.x.y.z are for Android.Support (legacy) and versions 1xx.yy.zz are AndroidX based - so stick with 1xx

If this answers your question please be so kind and close the issue

Thanks mel

moljac avatar Oct 15 '20 16:10 moljac

Following on from @StepanMynarik's comment, I've hit this problem too and had been waiting for a 1xx.yy.zz version of the Crashlytics nuget. I see last week that most of the Xamarin Google nugets moved out of preview for a full 1xx version, except for Xamarin.Firebase.Crashlytics which is still on v117.0.0-preview02.

That relies on (for example) Xamarin.Firebase.Common v119.3.0-preview02 - the latest relesaed version is v119.3.0 so I gave it a go and imported the nuget into my project. While the app built, and the APIs for (for example) Firebase.Crashlytics.FirebaseCrashlytics.Instance.RecordException are present, trying to start the app immediately crashed with reference to Dagger libaries.

Do you know if this is expected behaviour (and why it's not come out of preview02 yet)? Any help much appreciated.

stevecluk avatar Oct 18 '20 16:10 stevecluk

Someone's been through and got the new NuGets working for Firebase Crashlytics, and put their steps here: https://github.com/a-imai/XamarinCrashlyticsUpgradeSample

I've given it a run through and seen Firebase acknowledge it's using the latest Firebase library (so not warning about the November deadline), and showing non-fatal exceptions, and have seen a fatal exception arrive too (though was expecting to see two), but progress!

stevecluk avatar Oct 25 '20 19:10 stevecluk

@stevecluk Thanks for the feedback and the sample. Appreciated.

moljac avatar Oct 25 '20 20:10 moljac

Hi @stevecluk early today i've achieve complete the console validation for the new version... but i dont seen any fatal error logged... later i've follow all that you wrote here and xamarin forum, and i've only get an fatal error when run my app in RELEASE... but the log is like obfuscated:

Fatal Exception: android.runtime.JavaProxyThrowable System.InvalidOperationException: Nullable object must have a value. at System.Nullable`1[T].get_Value () [0x00008] in <71d277dd62834e57a9da28a9f1bb8775>:0 at FincAppDistribucion.View.Abastecimiento.ListaPedidosViewModel.Recepcionar () [0x00029] in :0 at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) [0x00000] in <71d277dd62834e57a9da28a9f1bb8775>:0 at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in <2688588051224faa9165750d87b751a6>:0 at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <2688588051224faa9165750d87b751a6>:0 at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <2688588051224faa9165750d87b751a6>:0 at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.42(intptr,intptr)

and all the logs are tittled the same exception: android.runtime.JavaProxyThrowable can you help me a little bit for if i've forgot something?

megonzalezn avatar Oct 28 '20 21:10 megonzalezn