I have been using the latest Crashlytics (Fabric integration) for a while. But recently I encountered the following crash error due to missing dependency although I didn\'t
In my case, I was using fabric in a "CommonLib" module that was added as a dependency in all other modules (including app).
So, I had added apply plugin: 'io.fabric'
after buildscript {}
block. So, I placed two plugins together:
apply plugin: 'com.android.library'
apply plugin: 'io.fabric'
And problem got solved!
I had this commented out in gradle
apply plugin: 'io.fabric'
needed to uncomment it
Or if you don't have it, add it!
In case this helps someone else, I had a similar issue when upgrading Crashlytics to Fabric. In my case, the plugin left 2 lines from Crashlytics that I needed to manually remove before it would work.
In the gradle file, under buildscript dependencies, I had to manually remove:
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.16.0'
Also, under dependencies, I had to manually remove:
compile 'com.crashlytics.android:crashlytics:1.1.13'
If you are using the disable function during debug as shown
Crashlytics crashlyticsKit = new Crashlytics.Builder()
.core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build())
.build();
Fabric.with(this, crashlyticsKit);
What happens when you update the version of crashlytics is that
Fabric.with(this, crashlyticsKit);
is turned to
Fabric.with(this,new Crashlytics());
So make sure to change that back to crashlyticskit. If you are doing this correctly and the error still appears then make sure you have
debug {
ext.enableCrashlytics = false
}
under android {buildtypes{}}
For me it was because of dataBinding = true
. Upgrading the fabric gradle plugin to 1.21.0 fixed the issue: https://twittercommunity.com/t/fabric-gradle-plugin-1-21-0-add-support-for-android-databinding-true/57474