我有一个具有以下结构的 Android Instant App:
- B:基础模块
- 已安装:已安装的应用模块
- Instant:即时应用模块
- F:具有特定于已安装应用程序的功能的功能。F 取决于位于
local-lib
的本地 aar 库project\F\libs
。
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
,并且它有效。所以基本上我需要 2 个副本local-lib
来完成这项工作?我应该如何组织导入以避免重复?完美的情况是libs
文件夹在F
模块内。