Maven-android-plugin based example Android app project
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

m2droid - Maven Android Plugin example project

What to write? - this is my first OSS project!

Well, the hope is that this project will get a potential Android dev up and coding apps as painlessly as possible (remember I said 'hopefully').

The App contains some very basic (and fairly useless) code, but hey, it shows you how to access and "design" Views etc.

This Maven project is based on the Maven Android Plugin.

Please install the Android SDK then point an environment variable names 'ANDROID_HOME' at its top-level directory (i.e. ANDROID_HOME=/path/to/A-SDK).


Eclipse project files (or pom.xml import - m2eclipse-plugin or in Netbeans)

mvn eclipse:eclipse

Tidy up

mvn clean

Compile the .apk file etc.

mvn package

#Install and start emulator mvn android:emulator-start

#Deploy to attached device mvn android:deploy

Or combine the above:

mvn clean package android:deploy

Don't forget to either name an emulator 'em22' or change the pom.xml accordingly.

P.S. Why use Maven? Maven is great for distributing projects and getting a quick footing, I've found it slightly difficult to configure within complex projects it hasn't been as 'flexible' as Apache Ant IMHO. Have a look at Maven and Ant together (for Maven library/dependency management within Ant) at

BTW Maven 3 will have programmatic configuration via a number of languages, so maybe that advance things, considerably ;-) .

I'd like to thank Wakaleo Training for their excellent Android with Maven tutorial(s).