我正在尝试使用 android 引导程序:https ://github.com/donnfelker/android-bootstrap
所以我按照说明进行操作:
- 从网站生成应用程序
- 安装 Maven(此处为 Windows 7)
- 添加一些环境变量(JAVA_HOME、M2、M2_HOME、ANDROID_HOME)
- 检查 Maven 是否成功安装(cmd > mvn --version)
一切看起来都很好。
所以我从应用目录尝试下一个命令:
mvn clean package
我在构建过程中遇到了一些错误:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 41.770s
[INFO] Finished at: Wed Oct 17 17:22:28 CEST 2012
[INFO] Final Memory: 14M/66M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:andr
oid-maven-plugin:3.3.0:proguard (default-proguard) on project com-jschmitt-diale
r: MojoExecutionException: ANDROID-040-001: Could not execute: Command = cmd.exe
/X /C ""C:\Program Files (x86)\Java\jdk1.7.0_02\jre\bin\java" -Xmx512M -jar "C:
\Program Files (x86)\Android\android-sdk\tools\proguard\lib\proguard.jar" @../pr
oguard.cfg -injars C:\Users\Julien\Documents\Android\Bootstrap\app\target\classe
s -injars C:\Users\Julien\.m2\repository\com\google\code\gson\gson\2.1\gson-2.1.
jar(!META-INF/maven/**,!META-INF/MANIFEST.MF) -injars C:\Users\Julien\.m2\reposi
tory\com\github\rtyley\roboguice-sherlock\1.4\roboguice-sherlock-1.4.jar(!META-I
NF/maven/**,!META-INF/MANIFEST.MF) -injars C:\Users\Julien\.m2\repository\org\ro
boguice\roboguice\2.0\roboguice-2.0.jar(!META-INF/maven/**,!META-INF/MANIFEST.MF
) -injars C:\Users\Julien\.m2\repository\com\google\inject\guice\3.0\guice-3.0-n
o_aop.jar(!META-INF/maven/**,!META-INF/MANIFEST.MF) -injars C:\Users\Julien\.m2\
repository\javax\inject\javax.inject\1\javax.inject-1.jar(!META-INF/maven/**,!ME
TA-INF/MANIFEST.MF) -injars C:\Users\Julien\.m2\repository\aopalliance\aopallian
ce\1.0\aopalliance-1.0.jar(!META-INF/maven/**,!META-INF/MANIFEST.MF) -injars C:\
Users\Julien\.m2\repository\com\google\android\support-v4\r7\support-v4-r7.jar(!
META-INF/maven/**,!META-INF/MANIFEST.MF) -injars C:\Users\Julien\.m2\repository\
com\github\kevinsawicki\http-request\2.1\http-request-2.1.jar(!META-INF/maven/**
,!META-INF/MANIFEST.MF) -injars C:\Users\Julien\.m2\repository\com\nineoldandroi
ds\library\2.2.0\library-2.2.0.jar(!META-INF/maven/**,!META-INF/MANIFEST.MF) -in
jars C:\Users\Julien\.m2\repository\com\github\kevinsawicki\android-pusher\0.6\a
ndroid-pusher-0.6.jar(!META-INF/maven/**,!META-INF/MANIFEST.MF) -libraryjars "C:
\Program Files (x86)\Java\jdk1.7.0_02\jre\lib\rt.jar" -libraryjars "C:\Program F
iles (x86)\Java\jdk1.7.0_02\jre\lib\jsse.jar" -libraryjars "C:\Program Files (x8
6)\Java\jdk1.7.0_02\jre\lib\jce.jar" -libraryjars C:\Users\Julien\.m2\repository
\com\google\android\android\4.1.1.4\android-4.1.1.4.jar(!org/xml/**,!org/w3c/**,
!org/apache/http/**,!java/**,!javax/**,!android/net/http/AndroidHttpClient.class
) -libraryjars C:\Users\Julien\.m2\repository\commons-logging\commons-logging\1.
1.1\commons-logging-1.1.1.jar -libraryjars C:\Users\Julien\.m2\repository\org\ap
ache\httpcomponents\httpclient\4.0.1\httpclient-4.0.1.jar -libraryjars C:\Users\
Julien\.m2\repository\org\apache\httpcomponents\httpcore\4.0.1\httpcore-4.0.1.ja
r -libraryjars C:\Users\Julien\.m2\repository\commons-codec\commons-codec\1.3\co
mmons-codec-1.3.jar -libraryjars C:\Users\Julien\.m2\repository\org\khronos\open
gl-api\gl1.1-android-2.1_r1\opengl-api-gl1.1-android-2.1_r1.jar -libraryjars C:\
Users\Julien\.m2\repository\xerces\xmlParserAPIs\2.6.2\xmlParserAPIs-2.6.2.jar -
libraryjars C:\Users\Julien\.m2\repository\xpp3\xpp3\1.1.4c\xpp3-1.1.4c.jar -lib
raryjars C:\Users\Julien\.m2\repository\org\json\json\20080701\json-20080701.jar
-libraryjars C:\Users\Julien\.m2\repository\com\actionbarsherlock\library\4.1.0
\library-4.1.0.jar -outjars 'C:\Users\Julien\Documents\Android\Bootstrap\app\tar
get\proguard-obfuscated.jar' -dump 'C:\Users\Julien\Documents\Android\Bootstrap\
app\target\proguard\dump.txt' -printseeds 'C:\Users\Julien\Documents\Android\Boo
tstrap\app\target\proguard\seeds.txt' -printusage 'C:\Users\Julien\Documents\And
roid\Bootstrap\app\target\proguard\usage.txt' -printmapping 'C:\Users\Julien\Doc
uments\Android\Bootstrap\app\target\proguard\mapping.txt'", Result = 1 -> [Help
1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
因为这是我第一次使用 Android Bootstrap 和 Maven,所以我不明白这是什么错误以及如何纠正它......
如果您需要更多信息,例如 POM 文件或详细环境变量,请随时问我!