Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven using Android Library project with ADT [closed]

Tags:

android

maven

adt

How can i use Maven to successfully configure android library type project under Android Development Toolkit

I am able to add a packaging type AAR but the classes from the lirbary project are not visible/available.

I want to be able to see the referenced classes in my build path for development as currently m2e plugin does not support this.

like image 861
Abs Avatar asked Mar 09 '26 21:03

Abs


1 Answers

I have been able to accomplish this with the newest release of the android-maven-plugin

v 3.8.2 that supports and integrates AAR library packaging

In order to use the generated Library files within your ADT workspace: Add the generated folder from target/unpacked-libs as source folder to work with while developing.

BuildPath-> Use as source folder

If someone has a better way to doing this please share..

Maven 3.1.1+

Sample Maven Configuration:

            <plugin>
            <groupId>com.jayway.maven.plugins.android.generation2</groupId>
            <artifactId>android-maven-plugin</artifactId>
            <version>${android-maven-plugin-version}</version>
            <goals>
                <goal>consume-aar</goal>
            </goals>
            <extensions>true</extensions>
            <configuration>
                <sdk>
                    <platform>${android-platform}</platform>
                </sdk>
                <deleteConflictingFiles>true</deleteConflictingFiles>
                <undeployBeforeDeploy>true</undeployBeforeDeploy>
            </configuration>
        </plugin>
like image 92
Abs Avatar answered Mar 12 '26 09:03

Abs