Forum Xamarin Xamarin.Forms

Crashlytics on Xamarin.Forms

Hi, I'm trying to set up Crashlytics on Xamarin.Forms specifically for android, I've followed the steps of the readme on the NuGet package of Xamarin.Android.Crashlytics https://github.com/xamarin/XamarinComponents/blob/master/Android/Crashlytics/README.md, but it didn't work and resulted in the following error:

Unhandled Exception:
Java.Lang.RuntimeException: Unable to get provider com.crashlytics.android.CrashlyticsInitProvider: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
install an Android build tool and ask a team member to invite you to this app's organization.

I've tried the solution stated in this answer on StackOverflow but still doesn't and I get the same error.

Anyone has successfully set up Crashlytics in Xamarin.Forms?

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai

    Check if you've added com.crashlytics.android.build_id in Resources/values/Strings.xml.

    <resources>
        <string name="com.crashlytics.android.build_id">1</string>
    </resources>
    

    To use Crashlytics on Android, please make sure the following points:

    • Add the required nuget packages
    • Add <MetaData> line in AndroidManifest with your API_KEY
    • Add com.crashlytics.android.build_id in Resources/values/Strings.xml
    • Add the Fabric.Fabric.With(this, new Crashlytics.Crashlytics()) method;

    Similar issue:
    https://github.com/xamarin/XamarinComponents/issues/448

  • marcmidmarcmid Member ✭✭
    edited December 2019

    Hi @Jarvan thanks for the response,
    I've already tried this but is still not working. I think the problem might be that I'm not using the correct Api Key. The Api Key that I'm using is the one that the firebase gives you when you go to project settings.
    I've used Crashlytics in an android project and I didn't need a Fabric account, but maybe in Xamarin I must have a Fabric account and I should get the Api Key from there. Honestly, I'm pretty lost so any response is welcome.

  • JarvanJarvan Member, Xamarin Team Xamurai

    Here is a guide about necessary steps for setting up Crashlytics in Xamarin, hope it'll be helpful.

  • marcmidmarcmid Member ✭✭

    Thanks @Jarvan, this is the guide I followed the first time and I try it again today but is still not working It keeps throwing the same error.

Sign In or Register to comment.