android构建在jenkins上失败,但在本地运行成功,以下是构建输出:
:app:compileDebugJavaNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
advice defined in hugo.weaving.internal.Hugo has not been applied [Xlint:adviceDidNotMatch]
:app:compileRetrolambdaDebugobjc[91376]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileRetrolambdaDebug'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.发布于 2015-06-02 01:24:33
有两个enviroment_variables指向不同are (java运行时环境)。Jenkins不知道他应该使用哪一个。
您可能已经在Jenkins中设置了enviroment_variable,在那里可以找到JRE。但同时,运行jenkins的OS也有一个enviroment_variable,它指向找到JRE的其他位置。
您可以自行决定要删除其中的哪一个。
发布于 2015-09-16 21:40:32
试着这样构建你的项目,分两步:
./gradlew prepareDebugDependencies
./gradlew assembleDebug有关原因的讨论,请参阅https://github.com/evant/gradle-retrolambda/issues/105。
另外(可能对其他人有帮助),确保您已经设置了类似以下内容的环境变量:
export JAVA7_HOME=/usr/lib/jvm/java-7-oracle
export JAVA8_HOME=/usr/lib/jvm/java-8-oracle
export JAVA_HOME=$JAVA7_HOMEhttps://stackoverflow.com/questions/30577061
复制相似问题