levibostian / AndroidBlanky

Create a new Android app fast. Comes pre-installed with libraries you already use.
7 stars 0 forks source link

Disable crashlytics on debug builds. #1

Closed levibostian closed 8 years ago

levibostian commented 8 years ago

The current way doing it is wrong.

build.gradle: delete this line: ext.enableCrashlytics = false

In Application file, add this:

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

Also, in the README talking about fabric, the part about fabric.properties is correct. However, it is not complete. You need to still use the Fabric Android Studio plugin to install it completely by adding the meta data code into the manifest file. So add to readme about using the plugin to finish installing.