Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import Android AAR dependencies using Maven in Eclipse?

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.

like image 271
Jack Avatar asked Jul 11 '14 16:07

Jack


1 Answers

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

like image 67
Ricardo Gladwell Avatar answered Oct 06 '22 00:10

Ricardo Gladwell