
16

解决 Jenkins 报错 Direct local .aar file dependencies are not supported when bui...
source link: http://i.lckiss.com/?p=7407
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

解决 Jenkins 报错 Direct local .aar file dependencies are not supported when building an AAR.
2021-08-10
主要原因是指:在一个 library 的项目中使用了 AAR,以往的 gradle 解决办法是使用 fat-aar 插件,但目前该插件并未更新适配最新版,所以稳妥的解决办法只有将 aar 移动到 宿主 app 中进行依赖。而新版依赖起来也更简单:
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
目前没找到更好的方式,当然网上也有说使用一个单独的 module 去装这个 aar,但我觉得小题大做了,也没尝试,毕竟如果十几个 aar 不得用十几个 module?
不过随便怎么玩,本地编译其实都无所谓,估计是 AS 做了啥?
单个 module 依赖的解决方式参考:完美解决Direct local .aar file dependencies are not supported when building an AAR.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK