Search code examples
androidgradlecrashlyticsgoogle-fabriccrashlytics-android

Fabric plugin incompatible with Gradle 4.4 +


Recently I have had to update my project to use Gradle 4.4 from 4.1. i.e.

distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

in my gradle-wrapper.properties file.

However, this is incompabitble with the fabric plugin

apply plugin: 'io.fabric'

As since the gradle update, I now get build errors when syncing my project. Such as:

Error:Could not get unknown property 'manifestFile' for task ':Module:generateVariantFlavorRFile' of type com.android.build.gradle.internal.res.GenerateLibraryRFileTask.

Does anyone know when/if there will be a new plugin update that is compatible with gradle 4.4+?


Solution

  • So my project included feature modules, where in the the base module's build.gradle, I apply the fabric plugin. i.e. apply plugin: 'io.fabric'

    It turns out that gradle version 4.4 + does work but you need to add the following:

    crashlytics { instantAppSupport true }
    

    in your base module's build.gradle. I didn't actually have an instant app, but even with feature modules in appears that this line is needed.

    More info on how this can be added can be found here: How do I integrate Crashlytics with Android Instant Apps?