Fabric plugin incompatible with Gradle 4.4 +

走远了吗. 提交于 2019-12-07 12:14:55

问题


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+?


回答1:


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?



来源:https://stackoverflow.com/questions/49007025/fabric-plugin-incompatible-with-gradle-4-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!