Create Android library that uses AAR file as dependency

  aar, android, gradle, sdk

I want to build android library as AAR file that includes dependencies in output AAR file. It uses another AAR file as dependency from libs folder.

enter image description here

Building library shows this error:

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.

I tried extracting AAR file as module
enter image description here

And then imported it as a project
enter image description here

Build command worked, but it does not include external library in classes.jar
enter image description here

My file is

-dontwarn javax.annotation.Nullable
-dontwarn com.facetec.sdk.**
-keep class com.facetec.sdk.** { *; }

I’ve also tried to use library and imported facetec-sdk module as embed project, but build command showed lint error

enter image description here

Source: Android Questions