Android Gralde 新版aar依赖问题解决
问题:direct local .aar file dependencies are not supported when building an aar.
1.mylibrary 下 build.gradle 文件 .aar文件依赖修改:
之前为:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
}
更改为:
dependencies {
compileOnly fileTree(dir: 'libs', include: ['*.jar','*.aar'])
}
2.app 下 build.gradle 文件添加以下:
dependencies {
implementation project(':myLibrary')
implementation fileTree(dir: '../myLibrary/libs', include: ['*.jar', '*.aar'])
}