Forum Xamarin.Android

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

How to connect with Firebase Crashlytics with xamarin forms android app

I am trying to connect with firebase Crashlytics and integrated as per document. But I am not able to track issue in firebase and firebase continuously show is following error

Add the Firebase Android SDK (17.1.1 or higher) or Unity Plugin (6.15.0 or higher), then build, run and crash your app.

How to resolve this error?

Best Answer

  • jezhjezh Member, Xamarin Team Xamurai
    Accepted Answer

    Have you set up your app correctly ?

    For this, you can check: https://github.com/xamarin/XamarinComponents/tree/master/Android/Crashlytics

    Please follow up the document:

    1. Make sure you have a project setup in the Firebase Developer Console.
    2. Download your project's google-services.json file and place it in the folder of your Xamarin.Android project.
    3. Add the Xamarin.Android.Crashlytics NuGet package.
    4. Restart your IDE
    5. Add google-services.json to your Xamarin.Android app project.
    6. Set the build action of google-services.json to GoogleServicesJson
    7. Create a string resource with the name com.crashlytics.android.build_id. The value can be whatever you want to uniquely identify a particular build with.
    8. Clean and Rebuild your solution.

    And you can initialize the Crashlytics SDK with the following code in your main activity's OnCreate:

    Fabric.Fabric.With(this, new Crashlytics.Crashlytics());
    

Answers

  • jezhjezh Member, Xamarin Team Xamurai
    Accepted Answer

    Have you set up your app correctly ?

    For this, you can check: https://github.com/xamarin/XamarinComponents/tree/master/Android/Crashlytics

    Please follow up the document:

    1. Make sure you have a project setup in the Firebase Developer Console.
    2. Download your project's google-services.json file and place it in the folder of your Xamarin.Android project.
    3. Add the Xamarin.Android.Crashlytics NuGet package.
    4. Restart your IDE
    5. Add google-services.json to your Xamarin.Android app project.
    6. Set the build action of google-services.json to GoogleServicesJson
    7. Create a string resource with the name com.crashlytics.android.build_id. The value can be whatever you want to uniquely identify a particular build with.
    8. Clean and Rebuild your solution.

    And you can initialize the Crashlytics SDK with the following code in your main activity's OnCreate:

    Fabric.Fabric.With(this, new Crashlytics.Crashlytics());
    
  • SurendharSurendhar Member ✭✭

    I have done all the steps mentioned. But still error not resolved. Is anything else need to implemented or need to add any nuget packages?

Sign In or Register to comment.