无法从'11 .0.4'确定Java版本

时间:2019-12-13 05:45:27

标签: java gradle

我最近在计算机上安装了gradle-6.0.1并下载了eclipse插件。但是,当我尝试创建Gradle Project时,eclipse会显示此错误:无法从'11 .0.4'确定Java版本。有关如何解决此问题的任何想法?

gradle -version输出:

------------------------------------------------------------
Gradle 6.0.1
------------------------------------------------------------

Build time:   2019-11-18 20:25:01 UTC
Revision:     fad121066a68c4701acd362daf4287a7c309a0f5

Kotlin:       1.3.50
Groovy:       2.5.8
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          11.0.4 (Oracle Corporation 11.0.4+10-LTS)
OS:           Windows 10 10.0 amd64

gradlew --version输出:

------------------------------------------------------------
Gradle 6.0.1
------------------------------------------------------------

Build time:   2019-11-18 20:25:01 UTC
Revision:     fad121066a68c4701acd362daf4287a7c309a0f5

Kotlin:       1.3.50
Groovy:       2.5.8
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          11.0.4 (Oracle Corporation 11.0.4+10-LTS)
OS:           Windows 10 10.0 amd64

1 个答案:

答案 0 :(得分:0)

转到gradle-wrapper.properties文件,并将gradle版本更改为6.0.1

distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip