android-Direct local .aar file dependencies are not supported when building an AAR

release 打包报错:Direct local .aar file dependencies are not supported when building an AAR
感谢:https://blog.csdn.net/janix520/article/details/125040910 作者

解决办法:
module:

原来把aar扔到libs下,直接这样引入
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])

改为
compileOnly fileTree(dir: 'libs', include: ['*.jar', '*.aar'])

主项目:

注意:module的libs下的aar拷贝一份到主项目libs

implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])

两个地方一起改

你可能感兴趣的:(android-Direct local .aar file dependencies are not supported when building an AAR)