与Android的Maven的插件问题 [英] issues with android-maven-plugin
问题描述
(后真的好几个小时尝试它,我终于辞职了。)
(After really many hours trying it, I finally resign.)
好吧:
-1。我
mvn -X archetype:generate -DarchetypeArtifactId=android-release
-DarchetypeGroupId=de.akquinet.android.archetypes -DarchetypeVersion=1.0.9
-DgroupId=org.me -DartifactId=myAndroidApp -Demulator=myEmu
-Dplatform=10
-2。第一个问题:你必须手动编辑顶层的pom.xml添加
-2. First issue: you must manually edit top-level pom.xml to add
< properties>
< platform.version> 2.3.3 < /platform.version>
&LT; /性能>
< /properties>
尽管这是 -Dplatform = 10
和2.3.3
despite it is a straightforward relationship between -Dplatform=10
and 2.3.3
-3。 (可能)第二期(仪器测试:myAndroidApp-它DIR)
你必须编辑AndroidManifest.xml中,并检查是否的android:targetPackage
价值
是正确的。
-3. (possibly) Second issue (instrumentation tests: myAndroidApp-it dir.)
You have to edit AndroidManifest.xml and check whether the android:targetPackage
value
is right
-4。第三个问题(我不能能够解决)。与zipalign处理分类器的依赖问题
在仪器仪表测试(myAndroidApp-它DIR)。
-4. Third issue (which I couldn't be able to resolve). Problems with zipaligned-classifier dependencies in the instrumentation tests (myAndroidApp-it dir.)
做当 MVN安装
-4.1
[WARNING] The POM for org.me:myAndroidApp:apk:${zipaligned-classifier}:1.0-SNAPSHOT
is missing, no dependency information available
[WARNING] The POM for org.me:myAndroidApp:jar:1.0-SNAPSHOT
is missing, no dependency information available
-4.2
[ERROR] Failed to execute goal on project myAndroidApp-it:
Could not resolve dependencies for
project org.me:myAndroidApp-it:apk:1.0-SNAPSHOT:
The following artifacts could not be resolved:
org.me:myAndroidApp:apk:${zipaligned-classifier}:1.0-SNAPSHOT, org.me:myAndroidApp:jar:1.0-SNAPSHOT:
Could not find artifact org.me:myAndroidApp:apk:${zipaligned-classifier}:1.0-
感谢
更新:报告的问题<一href=\"http://$c$c.google.com/p/maven-android-plugin/issues/detail?id=345&thanks=345&ts=1358700408\"相对=nofollow>这里
推荐答案
我的事在添加此你的&LT;性状&gt;
部分可能会解决的第一个警告:
I thing adding this in your <Properties>
section may fix the first warning:
<zipaligned-classifier>aligned</zipaligned-classifier>
然后运行mvn安装在你的myAndroidApp项目。确保构建成功为您的应用程序(不关心你myAndroidApp-它),然后看看你的本地回购看到文物,凡安装。 (&LT; USER_HOME方式&gt; /平方米/库/组织/ ME
)
有关你的第二个警告:确保你在依赖这样的事情myAndroidApp-它:
For your second warning : ensure you have something like this in dependencies of myAndroidApp-it:
<dependency>
<groupId>org.me</groupId>
<artifactId>myAndroidApp</artifactId>
<type>apk</type>
<version>1.0-SNAPSHOT</version>
<dependency>
根据不同的文物,在那里安装你可能需要添加一个分类的这种依赖关系(因为你没有发布你的pom.xml这很难说什么会被MVN安装)。
Depending on the artifacts that where installed you may need to add a classifier for this dependency (since you didn't post your pom.xml it's difficult to say what will be installed by mvn).
<dependency>
<groupId>org.me</groupId>
<artifactId>myAndroidApp</artifactId>
<type>apk</type>
<classifier>${zipaligned-classifier}</classfier>
<version>1.0-SNAPSHOT</version>
<dependency>
这篇关于与Android的Maven的插件问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!