如何开始使用Android的Maven的插件? [英] how to start using android-maven-plugin?

查看:169
本文介绍了如何开始使用Android的Maven的插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第一步骤来使用Android的Maven的插件?

First steps to use the android-maven-plugin?

(对不起,我试着写一个回答您的问题ONW,但
系统抱怨:这不符合我们的质量标准
我不知道为什么)

(I'm sorry, I tried to write a "answer your onw question" but the systems complains: "It does not meet our quality standards" And I don't know why)

推荐答案

1 的设置Android主

1 Set android home

export ANDROID_HOME=/your/android-SDK/path

2 的运行

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

这里检查archetypeVersion或寻找其他人。

Here To check the archetypeVersion or look for other ones.

3

编辑myAndroidApp / pom.xml的(父级的pom.xml)来设置(它最初是无效)

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

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

在属性部分。请确保通信
平台8和platform.version 2.2.1之间
您可以在Android SDK中管理应用程式,得知API 8示 - > 2.2,
但必须访问<一个href=\"http://search.maven.org/#search%7Cgav%7C1%7Cg:%22com.google.android%22%20AND%20a:%22android%22\"相对=nofollow>这里看到最终数目为2.2.1。
(注:API 10 LT; - > 2.3.3)。

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

和运行它(在myAndroidApp / myAndroidApp目录)

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 ;-) )

这篇关于如何开始使用Android的Maven的插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆