How can I fix this CrashlyticsMissingDependencyException?

后端 未结 17 1495
耶瑟儿~
耶瑟儿~ 2020-12-04 18:42

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

相关标签:
17条回答
  • 2020-12-04 19:26

    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!

    0 讨论(0)
  • 2020-12-04 19:27

    I had this commented out in gradle

    apply plugin: 'io.fabric'
    

    needed to uncomment it

    Or if you don't have it, add it!

    0 讨论(0)
  • 2020-12-04 19:27

    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'
    
    0 讨论(0)
  • 2020-12-04 19:31

    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{}}

    0 讨论(0)
  • 2020-12-04 19:31

    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

    0 讨论(0)
提交回复
热议问题