2012-09-12 125 views
0

我試圖創建一個使用Maven的Android應用程序,如this blog構建失敗嘗試使用Maven

描述創建Android應用我試圖命令下面在我的Windows命令提示符,但得到了「構建失敗」,爲什麼?

C:\Users\abc\Desktop>mvn archetype:generate -DarchetypeArtifactId=android-qui 
ckstart \ -DarchetypeGroupId=de.akquinet.android.archetypes \ -DarchetypeVersion 
=1.0.8 \ -DgroupId=com.yourcompany \ -DartifactId=yourandroidapp 
[INFO] Scanning for projects... 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 0.143s 
[INFO] Finished at: Wed Sep 12 05:58:36 IST 2012 
[INFO] Final Memory: 2M/56M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] The goal you specified requires a project to execute but there is no POM 
in this directory (C:\Users\abc\Desktop). Please verify you invoked Maven fr 
om the correct directory. -> [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/MissingProject 
Exception 

回答

2

反斜線\意味着在Linux shell命令行突破,只是刪除他們,如果你在Windows上運行:

mvn archetype:generate -DarchetypeArtifactId=android-quickstart -DarchetypeGroupId=de.akquinet.android.archetypes -DarchetypeVersion=1.0.8 -DgroupId=com.yourcompany -DartifactId=yourandroidapp 

你就可以走了。