How to disable Crashlytics during development

后端 未结 28 2559
心在旅途
心在旅途 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 15:43

    Use this in MyApplication#onCreate()

    if (!BuildConfig.DEBUG) Crashlytics.start(this);
    

    EDIT If you upgraded to Fabric, use this answer instead.

提交回复
热议问题