Eclipse integration

Android's official development effort provides solid support for Eclipse integration, and we want to make sure that the Android Maven plugin helps bridge Maven, Android, and Eclipse.

First, you will need to install Eclipse Indigo, Juno, or Android Developer Tools (ADT), which is a plugin for Eclipse that provides a professional-grade development environment to build Android apps.

Installing the Android connector

The m2e Android plugin is an M2E connector that adds Maven support to Eclipse or ADT.

Install it via Eclipse Marketplace, and perform the following steps:

  1. Select Help | Eclipse Marketplace... and search for android m2e.
  2. Click on the Install button next to the Android connector for Maven that appears, and follow the path through the wizard dialog to install the plugin and all its dependencies.
  3. Accept the terms of the license and click on Finish.
  4. If you cannot access Marketplace, select Help | Install New Software and paste the http://download.eclipse.org/technology/m2e/releases/ repository. Then, check Maven Integration for Eclipse, click on the Next button, accept the terms of the license, and click on Finish.
  5. Restart your Eclipse workspace.

Mavenized Android Project

If you have an Android project configured, right-click on it and chose Configure | Convert to Maven Project.

If you are starting with a new project, you can use the Maven Android archetypes to create Android projects completely within Eclipse using the following steps:

  1. Create a new Maven Project by navigating to File | New | Project.
  2. Select Maven | Maven Project.
  3. When prompted to select an archetype, click on Add Archetype.
  4. In the Archetype Group Id field, enter de.akquinet.android.archetypes.
  5. In the Archetype Artifact Id field, enter android-quickstart.
  6. In the Archetype Version field, enter 0.1.0.
  7. When prompted, enter your desired project group and the artifact ID, version, and platform property for the Android version (the default is 16).
  8. Click on Finish.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset