We are using andorid-maven-plugin to simplify the dependent library management. You won't be able to using some of the ADT features (e.g. Run or Debug As Android Application), and the following are the alternative or tips you can use.
Deploy
- Right click project root, and select Run As -> Maven build
- Enter clean package android:deploy as the goal (this is only needed the first time, since it will run whatever you configured before in the future runs)
Debug
- Deploy your new code to emulator or device
- Launch the application (note that it doesn't start automatically after deployment)
- Go to DDMS view
- Look for your application in the device tab (it will list your app using the package name you put in AndroidManifest.com
- Select it then click on the debug icon
- Now use your app as usual, and it will stop at the breakpoints you set
Override pom.xml settings
You can add <profile> to your Maven's settings.xml if you want to use different settings without modifying pom.xml. You will find the settings.xml in the conf folder in your Maven installation.
-
Add a profile like the following (name your profile to suite your needs)
<profile>
<id>kidsens-linux</id>
<properties>
<sdk.linux>/home/barry/dev/android-sdk-linux</sdk.linux>
<sdk>${sdk.linux}</sdk>
</properties>
</profile>
- Run maven with -P kidsens-linux
- you can reconfigure your existing run configuration by rick-click the project and select Run As -> Run Configurations ...
- find your maven build configuration and add it to the end of the goal (e.g. clean package android:deploy -P kidsens-linux)
Whatever you put in the profile will override what is in pom.xml. Note that putting profiles.xml along with pom.xml no longer works in Maven3.