Search code examples
androidgradleaar

How to import an .aar library file in a library module and export as single library?


I have an .aar library (libA.aar) file and a library module. The .aar file added to library module in dependencies section (at library module build.gradle)(libB.aar):

implementation files('libs/libA.aar')

When I export this library as an .aar file (libB.aar) the imported library (libA.aar) not found on exported file.

How can I import that .aar file in a library and having that in exported file? Is need to use offline Maven repository?

I need a fat library with all of dependency inside that as an .aar file.


Solution

  • You can create fat aar for your library with imported aar. Please go through https://android.jlelse.eu/android-fat-aar-from-gradle-892038facc87