How to disable Crashlytics during development

后端 未结 28 2571
心在旅途
心在旅途 2020-11-29 15:42

Is there any simple way to turn Crashlytics Android SDK off while developing ?

I don\'t want it to send a crash every time I do something stupid

On the othe

28条回答
  •  清酒与你
    2020-11-29 16:04

    Up to date easiest version when using Gradle to build:

    if (!BuildConfig.DEBUG) {
        Fabric.with(this, new Crashlytics());
    }
    

    It uses the new Built-In Syntax from Fabric for Crashlytics and works automatically with the a Gradle build.

提交回复
热议问题