无效的源版本:Gradle build时为1.8

时间:2016-06-17 13:28:24

标签: java windows gradle java-8

我的build.gradle

中有以下一行
sourceCompatibility = 1.8

当我编译它时,会发生以下错误:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> invalid source release: 1.8

将JAVA_HOME设置为短文件名没有帮助。

如何使用Windows 8下的Java 8构建Gradle?

更新

C:\>echo %JAVA_HOME%
C:\PROGRA~1\Java\jdk1.8.0_91

C:\>dir %JAVA_HOME%
COPYRIGHT  README.html                         THIRDPARTYLICENSEREADME.txt  db       javafx-src.zip  lib      src.zip
LICENSE    THIRDPARTYLICENSEREADME-JAVAFX.txt  bin                          include  jre             release

0 个答案:

没有答案