在本地成功运行时,jenkins上的android build失败,下面是build输出:
: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.
最佳答案
有两个enviroment_variables指向不同的JRE(Java运行时环境)。
Jenkins 不知道他应该使用哪一个。
可能您已经在Jenkins中设置了一个enviroment_variable,可以在哪里找到JRE。
但是与此同时,运行 Jenkins 的操作系统还具有一个enviroment_variable,该变量指向其他可在其中找到JRE的位置。
由您决定要删除其中的哪个。
关于android - gradle构建在 Jenkins 上使用Retrolambda失败,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/30577061/