How to disable Crashlytics during development

后端 未结 28 2602
心在旅途
心在旅途 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:49

    A strange problem that I encountered: I followed xialin's answer (which also appears on the official website) and it didn't work. Turned out that I was referencing BuildConfig in Fabric's package which also contains a static DEBUG variable that was set to false even in debug mode.

    So, if you follow the aforementioned solution and you still get debug reports, make sure that you're referencing this:

    import com.yourpackagename.BuildConfig;
    

    And not this:

    import io.fabric.sdk.android.BuildConfig;    
    

提交回复
热议问题