Wednesday, August 17, 2011

Android Maven Integration

Android does not hosts the dependent jars on Maven repositories. There are some very old versions in the repository which are not useful for current android development. The best way to do is to install the dependencies locally. Let's follow the step for the development for maven.
  • Make sure the Android SDK is installed locally. Takes the latest stable one.
  • Define ANDROID_HOME environment variable pointing to the path of android SDK installation. Do as per your platform. In windows m/c it might look like as follows:
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
  • It's better to create a project of android using android plugin of eclipse. Once the android plugin for eclipse is installed, create a project inside the eclipse.
  • Now create a pom.xml in the root directory of the project.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""


      <!-- platform or api level  -->
      <!-- name of avd device, make sure you have created a device -->

No comments:

Post a Comment