接手一个项目,十几个Module,并且还有自己封装的Maven私服代码(因为Maven私服的源代码不开源),所以只能用arr。
场景: 启动module A 引入Library module B 。
B Module 里面包含 arr。
compile(name: 'superMax', ext: 'aar')
所以导致A出现问题。
ERROR: Failed to resolve: :superMax
Affected Modules:A
解决方法
在A的gradle里面添加
意思是A 可以依赖到B的Lib库。
引入aar是在Lib中。
repositories {
flatDir {
dirs '../B/libs';dirs 'libs'
}
}