Share via

I am trying to integrate Firebase Analytics and Crashlytics into a .NET MAUI (.NET 10) Android application, but I am facing a runtime exception related to Crashlytics.

Vignesh Palthurai 0 Reputation points
2026-04-06T11:36:26.9566667+00:00

Steps I followed:

Created a new .NET MAUI project

Created a Firebase project and added an Android app

Ensured the ApplicationId matches the package name

Added google-services.json to: Platforms/Android/google-services.json

Set Build Action to GoogleServicesJson

Installed the following NuGet packages:

Plugin.Firebase
Plugin.Firebase.Analytics

Plugin.Firebase.Crashlytics
Configuration:

ApplicationId in .csproj: com.companyname.firebasepocapp

Package name in AndroidManifest.xml: com.companyname.firebasepocapp

Error:

At runtime, I get the following exception:
Java.Lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.IllegalStateException: The Crashlytics build ID is missing.
What I have tried:

Verified google-services.json placement and build action

Ensured package names match

Cleaned and rebuilt the solution

Questions:

Is additional Android Gradle configuration required for Crashlytics in .NET MAUI (.NET 10)?

Does Plugin.Firebase fully support Crashlytics for .NET 10?

Is there any required initialization code or setup missing for Analytics and Crashlytics?

Any guidance or working setup example would be helpful.

Environment:

.NET MAUI (.NET 10)

Android target

Visual Studio 2026

  • Plugin.Firebase (latest available version)
Developer technologies | .NET | .NET MAUI
0 comments No comments

1 answer

Sort by: Most helpful
  1. Nancy Vo (WICLOUD CORPORATION) 1,985 Reputation points Microsoft External Staff Moderator
    2026-04-07T03:37:44.04+00:00

    Hi @Vignesh Palthurai ,

    Thanks for your question.

    In a normal Android app, Google’s Gradle tools automatically create that badge (the "build ID").

    But in .NET MAUI, we’re not using normal Gradle, we use the Plugin.Firebase wrapper. The plugin brings in the real Crashlytics detective, but it doesn’t automatically create the badge.

    I recommend some following steps:

    1. Create (or open) the strings.xml file.

    Go to this exact folder in your MAUI project: Platforms/Android/Resources/values/

    Inside that folder, create a new file called strings.xml (if it doesn’t already exist).

    1. Then, put this content inside strings.xml:
    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <string name="com.google.firebase.crashlytics.mapping_file_id">none</string>
        <!-- Optional safety line -->
        <string name="com.crashlytics.android.build_id">1.0</string>
    </resources>
    
    1. Set the Build Action correctly
    • Right-click the strings.xml file in Solution Explorer.
    • Choose Properties.
    • Set Build Action to AndroidResource (very important!).
    1. Clean + Rebuild + Run Clean the solution → Rebuild → Run on Android device/emulator.

    Make sure you initialize Firebase and enable Crashlytics in MauiProgram.cs. Add this code before builder.Build():

    // Check Plugin.Firebase docs for the exact method in your version.
    builder.ConfigureFirebase();
    
    CrossFirebaseCrashlytics.Current.SetCrashlyticsCollectionEnabled(true);
    

    If ConfigureFirebase() is not available, you can also try:

    CrossFirebase.Initialize();
    

    I hope this addresses your question. If this response was helpful, please consider following the guidance to provide feedback.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.