本文介绍了Android的库与特定的产品口味的依赖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找类似

 应用插件:Android的图书​​馆依赖{
    flavor1Compile文件(utility.aar')
}

一切都失败:

解决方案

Libraries don't support flavors.

Note that this wouldn't work in a app project because you haven't defined the flavor first. You'd need to do

android {
    productFlavors {
        flavor1 {}
    }
}

dependencies {
    flavor1Compile ...
}

it wouldn't work in the other order as declaring the product flavor is what create its associated dependency configuration.

这篇关于Android的库与特定的产品口味的依赖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 12:07