我正在使用Android Studio 1.4

我的项目中有一个模块,在build.gradle中具有下一个依赖项:

dependencies {
    provided fileTree(dir: 'libs', include: ['*.jar'])
    provided 'junit:junit:4.12'
    apply plugin: 'com.google.gms.google-services'
    provided 'org.apache.directory.studio:org.apache.commons.io:2.4'
    provided 'com.google.android.gms:play-services:8.1.0'
    provided 'com.fasterxml.jackson.core:jackson-databind:2.2.0'
    provided 'com.fasterxml.jackson.core:jackson-core:2.2.0'
    provided 'com.fasterxml.jackson.core:jackson-annotations:2.2.0'
}

构建projectn并同步gradle之后,我在我的module/build/ouputs/aar文件夹中得到lib-release.aar。比我尝试文件>新建模块>导入JAR\AAR。然后,在添加之后
compile project(':mylib-release')

我只在“外部库”树中得到没有声明依赖性的程序包。如何仅通过编译我的库来启用这些软件包的自动安装?

最佳答案


compile fileTree(dir: 'libs', include: ['*.jar'])

代替
provided fileTree(dir: 'libs', include: ['*.jar'])

09-03 20:30