How to import Android AAR dependencies using Maven in Eclipse?

Jack picture Jack · Jul 11, 2014 · Viewed 9k times · Source

Note : I am using Maven 3.2.2, Eclipse Luna

This is the dependency in my pom.xml that uses Android AAR archive

<dependency>
    <groupId>com.github.gabrielemariotti.cards</groupId>
    <artifactId>library</artifactId>
    <version>1.7.3</version>
    <type>aar</type>
</dependency>

I can see the classes installed in target/classes folder.

But when I try to use the classes in the AAR, Eclipse is showing class cannot be resolved. I have no problem using classes added by JAR dependencies in pom.xml

Any help would be greatly appreciated.

Answer

Ricardo Gladwell picture Ricardo Gladwell · Jul 12, 2014

At this present moment in time the m2e-android plug-in cannot support AAR files because the ADT development team have not added AAR support to the Eclipse ADT plug-in.

This is an outstanding issue:

https://github.com/rgladwell/m2e-android/issues/177