简体   繁体   English

android库项目中第三方库的aar文件大小减小为0

[英]aar file size of third party library inside android library project reducing to 0

I have created an android library project and included some third party libraries (aar files) in lib folder. 我创建了一个android库项目,并在lib文件夹中包含了一些第三方库(aar文件)。 When I am generating library project build, I checked during aar file analysis that it still contains all third party libraries in lib folder but their size is 0. I am also getting class not found exception for third party library classes. 在生成库项目构建时,我在aar文件分析期间检查了该库是否仍包含lib文件夹中的所有第三方库,但它们的大小为0。我也发现第三方库类未找到类异常。 I have tried both debug and release build. 我尝试了调试和发布版本。 I have added all dependencies as 我已经将所有依赖项添加为

implementation fileTree(include: [' .jar', ' .aar'], dir: 'libs') 实现fileTree(包括:['. jar','. aar'],dir:'libs')

and then also tried individual 然后还尝试了个人

 implementation files('libs/XXX.aar') implementation files('libs/XYZ.aar') implementation files('libs/ABC.aar') implementation files('libs/ABD.aar') implementation files('libs/ABE.aar') implementation files('libs/ABK.aar') 

在此处输入图片说明

The lib that you created will be in a separate folder and not with the app source code. 您创建的库将位于单独的文件夹中,而不包含应用程序源代码。 you will find the sharable lib there. 您将在此处找到可共享的库。

Project -> lib name -> build -> output -> aar -> {lib name}-release.arr 项目->库名称->构建->输出-> aar-> {库名称} -release.arr

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM