【发布时间】:2014-09-11 09:43:53
【问题描述】:
我有一个 Gradle 项目,由两个子项目组成:UI 和后端库。 它自己的库依赖于另一个 .aar 库。
从库的 build.gradle 中提取:
dependencies {
compile(name: 'ActionBarSherlock', ext: 'aar')
}
从 UI 的 build.gradle 中提取:
dependencies {
compile project(":my_library")
compile fileTree(dir: 'libs', include: ['*.jar']) // all jars
}
当我尝试构建项目时,构建失败并出现以下错误:
> Could not resolve all dependencies for configuration ':UI:_debugCompile'.
> Could not find :ActionBarSherlock:.
Required by:
Project:UI:unspecified > Project:my_library:unspecified
我检查了my_library 的.aar 输出,它在libs 文件夹中不包含ActionBarSherlock.arr。如何告诉 Gradle 将 .arr 文件包含到库输出中?
【问题讨论】:
标签: android groovy gradle android-gradle-plugin