Friday, 15 March 2013

Converting Android as Maven Project


Now we can create / convert android projects as maven projects by using Maven-Android-Plugin. With the following simple steps you can convert android project as maven project.

Step -1:


 In your eclipse  install Maven-Android Plugin from eclipse market place. search m2e android and install it.

Step -2:

Create a pom.xml file in your project root directory and add required dependencies.

Step - 3:

Right click your project configure->Convert to maven project.

Step - 4:

Now you can build your project from terminal by using the command 

mvn clean install 

to deploy the android apk file into adb device run,

mvn android:deploy

and to run the application use,

mvn android:run

Your project structure should look like this,

 

 

 

Note: - In pom file change groupId, artifactId and version according to your project and package name.

No comments:

Post a Comment