【发布时间】:2017-05-31 13:03:56
【问题描述】:
我有一个具有以下结构的 Android Instant App:
- B:基本模块
- 已安装:已安装应用模块
- Instant:免安装应用模块
- F:具有特定于已安装应用程序的功能的功能。 F 依赖于位于
project\F\libs的本地aar 库local-lib。
F 的 build.gradle 如下:
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
api ":local-lib@aar"
}
我尝试将F 模块包含到Installed 应用程序模块中,如下所示:
dependencies {
implementation project(':B')
implementation project(':F')
}
但是gradle无法解析local-lib,报错:
Error:Could not resolve all dependencies for configuration ':Installed:releaseCompileClasspath'.
> Could not find :local-lib:.
Searched in the following locations:
... some remote repositories ...
Required by:
project :Installed > project :F
我尝试将libs 文件夹复制到project\Installed\libs,并且成功了。所以基本上我需要两份local-lib 才能完成这项工作?我应该如何组织导入以避免重复?如果libs 文件夹位于F 模块内,则完美的情况是。
【问题讨论】:
标签: android gradle android-gradle-plugin android-instant-apps