java gradle测试错误:retrolambda。oldJdk
在使用Java8时,如何在gradle中运行测试任务。我真的不想安装java<;7.以下是关于我的问题的错误日志
... BuildExceptionReporter]
... BuildExceptionReporter] FAILURE: Build failed with an exception.
... BuildExceptionReporter]
... BuildExceptionReporter] * What went wrong:
... BuildExceptionReporter] Execution failed for task ':test'.
... BuildExceptionReporter] > When running gradle with java 8, you must set the path to the old jdk, either with property retrolambda.oldJdk or environment variable JAVA6_HOME/JAVA7_HOME
... BuildExceptionReporter]
... BuildExceptionReporter] * Try:
... BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
```
# 1 楼答案
Retrolambda需要JavaJDK6或7。 设置环境变量JAVA6\u HOME或JAVA7\u HOME
https://github.com/evant/gradle-retrolambda#configuration