Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.89 KB

README.md

File metadata and controls

50 lines (34 loc) · 1.89 KB

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).

Commands:

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

P.S. Why use Maven? Maven is great for distributing projects and getting a quick footing, I've found it slightly complex 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 http://ptrthomas.wordpress.com/2009/03/08/why-you-should-use-the-maven-ant-tasks-instead-of-maven-or-ivy/.

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