You need to install the following configuration in pom:
<includeLibsJarsFromAar>true</includeLibsJarsFromAar>
So, it will look something like this:
<plugin> <groupId>com.jayway.maven.plugins.android.generation2</groupId> <artifactId>android-maven-plugin</artifactId> <extensions>true</extensions> <configuration> //... <includeLibsJarsFromAar>true</includeLibsJarsFromAar> //... rest of config </configuration> </plugin>
The reason for this change is that Google decided to put banks in aar, which is bad dependency practice. If you want to replace the version or something else, then this is currently not possible. In short, this makes dependency management difficult.
This parameter is set to false by default to cancel this behavior when creating aar with jar inside the libs folder.
Update:
Using the latest Android-Maven-Plugin (now 4.1.1 soon 4.2.0), this flag is set to true by default, so you no longer need to add it.
source share