How do i initialize the new version of crashlytics?

前端 未结 1 1087
后悔当初
后悔当初 2021-01-18 11:40

Everything works fine when I initialize my application with:

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

However, I get an exception when I use:<

1条回答
  •  说谎
    说谎 (楼主)
    2021-01-18 12:20

    Mike from Fabric and Crashlytics here. Your first init call is correct, but you could also use:

    Fabric.with(this, new CrashlyticsCore(), new Crashlytics());
    

    or use:

    Fabric.with(this, CrashlyticsCore.getInstance());
    

    with the following imports:

    import com.crashlytics.android.Crashlytics;
    import com.crashlytics.android.core.CrashlyticsCore;
    import io.fabric.sdk.android.Fabric;
    

    Using just CrashlyticsCore.getInstance() will give you only Crashlytics crash reporting and nothing else, where as new Crashlytics() would include Beta and Answers.

    0 讨论(0)
提交回复
热议问题