关于Gradle升级版本侯编译jenkins编译或者本地编译有aar报错
Direct local .aar file dependencies are not supported when building an AAR.The resulting AAR would be broken because the classes and Android resources from any local .aar
·
Direct local .aar file dependencies are not supported when building an AAR.
The resulting AAR would be broken because the classes and Android resources from any local .aar
file dependencies would not be packaged in the resulting AAR. Previous versions of the Android
Gradle Plugin produce broken AARs in this case too (despite not throwing this error). The
following direct local .aar file dependencies of the :library_module project caused this error:
______.aar
解决方案如下:
新建Module
新建完后把里面所有的文件除了自带的Gradle删除
然后下一步把Gradle里面的内容清空
把需要用到的aar放进来
下面就是Gardle里面的写法
configurations.maybeCreate("default")
artifacts.add("default",file("YouLibs"))
最后引入
引入可以用imp也可以用api
引入的是你新建的module
不要忘记再setting.gradle里面includ新建的module
更多推荐
已为社区贡献1条内容
所有评论(0)