Xamarin.Firebase packages needs to update to support .NET9.0 with Android35
Description
We have a mobile application built using .NET MAUI targeting .NET 8.0 and Android API level 34. As per the new Google Play policy, all app updates must target Android API level 35 by August 31, 2025.
To comply with this requirement, we are in the process of upgrading our app to .NET 9.0 with Android API level 35. However, we’ve encountered a significant blocker: the Xamarin.Firebase packages (especially Xamarin.Firebase.Crashlytics,Xamarin.Firebase.Analytics) are not currently compatible with .NET 9.0.
While some early versions of these packages appear to be available for .NET 10.0, that version is still in preview and not officially released. This leaves us unable to move forward with .NET 9.0 while maintaining Firebase support, which is critical for crash reporting and analytics in our production environment.
We kindly request:
Official support for Firebase packages (especially Crashlytics & Analytics) compatible with .NET 9.0 and Android API 35. Guidance or timelines on when these packages will be available, if already in progress. This support is essential for teams like ours who need to meet Google Play’s API requirements while maintaining production-grade monitoring.
Thank you!
the Xamarin.Firebase packages (especially Xamarin.Firebase.Crashlytics,Xamarin.Firebase.Analytics) are not currently compatible with .NET 9.0.
How are they not compatible?
Do you get an error message? What is it?
Thanks!
As an alternative, you can do this to force a .NET 8 app to target API 35, in AndroidManifest.xml:
<uses-sdk android:targetSdkVersion="35" />
This will cause a build warning (message improved in .NET 10), but you would just ignore the warning, and this should comply with Google's policy.
@sbkrishnan2506
I'm using the following in a net9.0-android35 project without problems. I don't do Maui, but I would have thought that should also work for Maui, or is there some other requirement for Maui?
<PackageReference Include="Xamarin.Firebase.Analytics" Version="122.5.0" />
<PackageReference Include="Xamarin.Firebase.Auth" Version="123.2.1" />
<PackageReference Include="Xamarin.Firebase.Crashlytics" Version="119.4.4" />
You don't really need Auth, though, as I use that for a user signing in.
I'm using Xamarin.Firebase.Messaging, and with new updates it gives compile error:
Error in obj\Debug\net9.0-android\lp\153\jl\classes.jar:androidx/savedstate/ViewKt.class: Type androidx.savedstate.ViewKt is defined multiple times: obj\Debug\net9.0-android\lp\153\jl\classes.jar:androidx/savedstate/ViewKt.class, obj\Debug\net9.0-android\lp\191\jl\classes.jar:androidx/savedstate/ViewKt.class java.exe error JAVA0000: Compilation failed
That is a common issue pinned at the top here:
- https://github.com/dotnet/android-libraries/issues
- https://github.com/dotnet/android-libraries/issues/764
It can be resolved by updating packages, usually. Sometimes it requires you to list more dependencies in the app until they are all aligned.
@jonathanpeppers thank you. Forcing all dependencies to latest version did the trick, until outdated component will be upgraded.
I am getting an error saying that the dependency doesn't support .NET 9. Has this been updated??
What is the exact error message? You can use net8.0-android packages in net9.0-android projects, so I don't know what error it would be.