Over a million developers have joined DZone.

Essential Resources When Building Android Apps Using Maven (and Eclipse)

DZone's Guide to

Essential Resources When Building Android Apps Using Maven (and Eclipse)

· Java Zone
Free Resource

Navigate the Maze of the End-User Experience and pick up this APM Essential guide, brought to you in partnership with CA Technologies

If you plan to build your Android application on a build server like Jenkins, Hudson, etc ... you should switch from building your project with your IDE (in my case Eclipse) to a build system like Maven or Gradle.

I tried Gradle but was totally disapointed by the poor performance. So I decided to use maven instead and found out about these resources which you have to read and understand:

  1. Maven Android Plugin
    You need the plugin to build android projects using maven. With Android API 17 the latest stable release 3.5.3 doesn't work. You have to pull the plugin's source from GitHub and build version 3.5.4-SNAPSHOT by yourself.
  2. Android SDK Deployer:
    "Typically artifacts are available in Maven Central, however only the platform versions available in the Android Open Source Project are published to Maven Central. Newer versions of the platform as well as the compatibility package and proprietary extensions like the Google Maps support are not available there and need to be published to your Maven repository, if you want to use them in your Android project.
    The artifacts published to Maven central are available as dependencies under the groupId com.google.android with the artifactId android and android-test.
    The Maven Android SDK Deployer has been created to publish artifacts from the Android SDK into your local repository or repository server when using components that are not available in Central."

    I have taken this from the online book Maven - The Complete Reference by Sonatype.
    With Android API 17 you might run into the same bug like described above. So before building this project you must build version 3.5.4-SNAPSHOT of the Maven Android Plugin
  3. m2e-android:
    In case you use Eclipse, you can use this m2e plugin to add maven support to your Eclipse Android project.

Thrive in the application economy with an APM model that is strategic. Be E.P.I.C. with CA APM.  Brought to you in partnership with CA Technologies.


Published at DZone with permission of Ralf Quebbemann, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}