failed to build the app #322

Closed
zjmdp opened this Issue Feb 20, 2013 · 2 comments

2 participants

@zjmdp

OS: Mac 10.8.2
Android sdk version: 17
Java version: 1.7.0_10
Marven version:3.0.3

Execute "mvn clean install", but failed to build with error:

Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.4.1:proguard (default-proguard) on project github-android: MojoExecutionException: ANDROID-040-001: Could not execute: Command = /bin/sh -c cd /Users/jamiemo/Documents/workspace/github-client-android/app && /Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre/bin/java -Xmx512M -jar /Users/jamiemo/Develop/android-sdks/tools/proguard/lib/proguard.jar @../proguard.cfg -injars '/Users/jamiemo/Documents/workspace/github-client-android/app/target/classes' -injars '/Users/jamiemo/.m2/repository/com/google/android/support-v4/r7/support-v4-r7.jar(!META-INF/maven/,!META-INF/MANIFEST.MF)' -injars '/Users/jamiemo/.m2/repository/com/github/rtyley/roboguice-sherlock/1.4/roboguice-sherlock-1.4.jar(!META-INF/maven/,!META-INF/MANIFEST.MF)' -injars '/Users/jamiemo/.m2/repository/org/roboguice/roboguice/2.0/roboguice-2.0.jar(!META-INF/maven/,!META-INF/MANIFEST.MF)' -injars '/Users/jamiemo/.m2/repository/com/google/inject/guice/3.0/guice-3.0-no_aop.jar(!META-INF/maven/,!META-INF/MANIFEST.MF)' -injars '/Users/jamiemo/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar(!META-INF/maven/,!META-INF/MANIFEST.MF)' -injars '/Users/jamiemo/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar(!META-INF/maven/,!META-INF/MANIFEST.MF)' -injars '/Users/jamiemo/.m2/repository/com/google/inject/extensions/guice-assistedinject/3.0/guice-assistedinject-3.0.jar(!META-INF/maven/,!META-INF/MANIFEST.MF)' -injars '/Users/jamiemo/.m2/repository/org/eclipse/mylyn/github/org.eclipse.egit.github.core/2.1.2/org.eclipse.egit.github.core-2.1.2.jar(!META-INF/maven/,!META-INF/MANIFEST.MF)' -injars '/Users/jamiemo/.m2/repository/com/google/code/gson/gson/2.2.2/gson-2.2.2.jar(!META-INF/maven/,!META-INF/MANIFEST.MF)' -injars '/Users/jamiemo/.m2/repository/com/github/kevinsawicki/http-request/3.0/http-request-3.0.jar(!META-INF/maven/,!META-INF/MANIFEST.MF)' -libraryjars '/Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre/../Classes/classes.jar' -libraryjars '/Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre/../Classes/jsse.jar' -libraryjars '/Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/jre/../Classes/jce.jar' -libraryjars '/Users/jamiemo/.m2/repository/com/google/android/android/4.0.1.2/android-4.0.1.2.jar(!org/xml/,!org/w3c/,!java/,!javax/)' -libraryjars '/Users/jamiemo/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar' -libraryjars '/Users/jamiemo/.m2/repository/org/apache/httpcomponents/httpclient/4.0.1/httpclient-4.0.1.jar' -libraryjars '/Users/jamiemo/.m2/repository/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar' -libraryjars '/Users/jamiemo/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar' -libraryjars '/Users/jamiemo/.m2/repository/org/khronos/opengl-api/gl1.1-android-2.1_r1/opengl-api-gl1.1-android-2.1_r1.jar' -libraryjars '/Users/jamiemo/.m2/repository/xerces/xmlParserAPIs/2.6.2/xmlParserAPIs-2.6.2.jar' -libraryjars '/Users/jamiemo/.m2/repository/xpp3/xpp3/1.1.4c/xpp3-1.1.4c.jar' -libraryjars '/Users/jamiemo/.m2/repository/org/json/json/20080701/json-20080701.jar' -outjars '/Users/jamiemo/Documents/workspace/github-client-android/app/target/proguard-obfuscated.jar' -dump '/Users/jamiemo/Documents/workspace/github-client-android/app/target/proguard/dump.txt' -printseeds '/Users/jamiemo/Documents/workspace/github-client-android/app/target/proguard/seeds.txt' -printusage '/Users/jamiemo/Documents/workspace/github-client-android/app/target/proguard/usage.txt' -printmapping '/Users/jamiemo/Documents/workspace/github-client-android/app/target/proguard/mapping.txt', Result = 1 -> [Help 1]

@atermenji

@zjmdp try to run mvn clean package to generate the .apk only. I'm having success building the project with Maven.
In case you will still have error rerun the build with -e and -X options. This will allow maven to print out a lot of debug and error trace info.

Maybe you have some problems with java installation or system permissions.

@zjmdp

@atermenji , so nice of you to reply my question, but I am building successfully when degrade the Android ADT and Android SDK tools from 21.1 to 21.0.1.

@atermenji atermenji closed this Nov 5, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment