Disable Crashlytics For Android App debug builds

Tip Of The Day:

 

Crashlytics is an excellent app debugging and crash analysis tool. Sometimes we may want to disable crashlytics for debug builds which speeds up gradle builds. Setting ext.enableCrashlytics = false  will  disable sending a mapping file to crashlytics backend 

debug {
    ext.enableCrashlytics = false
    debuggable true

Also  add below line in your app mainactivity  OnCreate  method  where we usually call Fabric.with(this, new Crashlytics());

Fabric.with(this, new Crashlytics.Builder().core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build());

 

 

Or you can completely disable crashlytics library for debug builds by adding releaseImplementation to app build.gradle

dependencies {
   ...
   releaseImplementation 'com.crashlytics.sdk.android:crashlytics:2.10.1' // update your version
}

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top