TobiasBuchholz / Plugin.Firebase

Wrapper around the native Android and iOS Firebase Xamarin SDKs
MIT License
220 stars 49 forks source link

Cannot initialize application in v1.3.0 on Android #136

Closed lemcoder closed 1 year ago

lemcoder commented 1 year ago

When i try to register application in MauiProgram.cs i get the following error:

Java.Lang.RuntimeException: 'Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.IllegalStateException: The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration. Please review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account.'

error occurs here:

 events.AddAndroid(android => android.OnCreate((activity, state) =>
                CrossFirebase.Initialize(activity, state, CreateCrossFirebaseSettings()))); // here

Works fine in v1.2.0

TobiasBuchholz commented 1 year ago

At Platforms/Android/Resources/values add the following line to your strings.xml:

<resources>
    ...
    <string name="com.google.firebase.crashlytics.mapping_file_id">none</string>
    ...
</resources>

This is needed because Crashlytics was added in version 1.3.0.

Drol commented 1 year ago

I didn't even have a strings.xml but it worked fine creating one and adding the line above.