Reference: http://blog.csdn.net/earbao/article/details/40741051
Android maven Environment Construction :
1. Maven version requires 3.1.1
2. Set android_home environment variable: android_home=c:\android\android-sdk-windows
3, in the PATH environment variable inside add:%android_home%\tools; %android_home%\platform-tools
4, open the SDK Manager, to complete the installation of Android version, or will be error.
5. Download Maven Android SDK Deployer
6. CD Maven-android-sdk-deployer-master
The default run MVN clean install installs all platform Apis,android 1.5, Android 2,.....
So if you don't fully download these APIs you will get an error.
For different platforms, you can use the command:
MVN install-p 1.5
MVN install-p 1.6
MVN INSTALL-P 2.1
MVN install-p 2.2
MVN install-p 2.3.3
MVN Install-p 3.0
MVN Install-p 3.1
MVN install-p 3.2
MVN install-p 4.0
MVN install-p 4.0.3
MVN install-p 4.1
MVN install-p 4.2
MVN install-p 4.3
MVN install-p 4.4
MVN install-p 4.4W
MVN Install-p 5.0
MVN install-p 5.1
MVN install-p MNC
If I had developed under Android 4.0, I could run
MVN Clean Install-p 4.0
This time needs to wait slowly ....
more information can be seen maven Android SDK Deployer of the GitHub home page.
7. Eclipse installs the M2E Android plugin and installs it directly in the Eclipse Marketplace search.
Plugin Home: Http://rgladwell.github.io/m2e-android/
Maven-android Project Environment Construction