(经过几个小时的努力,我终于辞职了。)
好的:
-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以添加
< properties>
< platform.version> 2.3.3 < /platform.version>< /properties>
尽管如此,-Dplatform=10和2.3.3之间的关系还是很直接的。
-3.(可能)第二个问题(仪器测试:myAndroidApp dir.)您必须编辑AndroidManifest.xml并检查android:targetPackage值是否正确。
-4.第三个问题(,我无法解决)。插装测试中对齐分类器依赖关系的问题(myAndroidApp dir.)
做mvn install时
-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-谢谢
更新:报告了问题这里
发布于 2013-01-20 14:01:42
在您的<Properties>部分中添加这些内容可能会修复第一个警告:
<zipaligned-classifier>aligned</zipaligned-classifier>然后在您的myAndroidApp项目中运行mvn。确保构建对您的应用程序是成功的(不关心您的myAndroidApp-它目前),然后看看您的本地回购,看看哪里安装的工件。(<USER_HOME>/.m2/repository/org/me)
对于第二个警告:确保在myAndroidApp-it的依赖项中有类似的内容:
<dependency>
<groupId>org.me</groupId>
<artifactId>myAndroidApp</artifactId>
<type>apk</type>
<version>1.0-SNAPSHOT</version>
<dependency>根据安装位置的工件,您可能需要为这个依赖项添加一个分类器(因为您没有发布pom.xml,所以很难知道mvn将安装什么)。
<dependency>
<groupId>org.me</groupId>
<artifactId>myAndroidApp</artifactId>
<type>apk</type>
<classifier>${zipaligned-classifier}</classfier>
<version>1.0-SNAPSHOT</version>
<dependency>https://stackoverflow.com/questions/14424569
复制相似问题