how to start using android-maven-plugin? [closed]

浪子不回头ぞ 提交于 2019-12-23 06:58:12

问题


First steps to use the android-maven-plugin?


回答1:


1 Set android home

export ANDROID_HOME=/your/android-SDK/path

2 Run

mvn archetype:generate -DarchetypeArtifactId=android-with-test 
-DarchetypeGroupId=de.akquinet.android.archetypes -DarchetypeVersion=1.0.9 
-DgroupId=org.me -DartifactId=myAndroidApp -Dplatform=8

Here To check the archetypeVersion or look for other ones.

3

Edit myAndroidApp/pom.xml (parent level pom.xml) to set (it is initially void)

<platform.version> 2.2.1 </platform.version>

in the properties section. Please make sure the correspondence between platform 8 and platform.version 2.2.1 You can learn in your android sdk manager app that API 8 <-> 2.2, but must visit here to see that the final number is 2.2.1. (Note: for API 10 <-> 2.3.3).

4

You can start right now to play with it. In the parent directory:

mvn clean install

and to run it (in myAndroidApp/myAndroidApp directory)

cd myAndroidApp
mvn android:run

Be sure you started a phone emulator or attached a real phone (in debug mode) to your computer.

Hope this saves you a whole weekend! (Too late for me ;-) )



来源:https://stackoverflow.com/questions/14441841/how-to-start-using-android-maven-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!