GradleConnector: Could not determine java version from '11.0.5'

巧了我就是萌 提交于 2020-01-24 19:04:43

问题


I know, I know, there are lots of questions with a similar problem but I believe this problem is inherent to the gradle-tooling-api package.

./gradlew --version gives 5.2.1, and the JVM stated there is specifically "11.0.5".

My build.gradle includes the following dependency:

implementation  'org.gradle:gradle-tooling-api:4.3'

... which is the latest version available at Maven Central. Have tried relevant searching ... nothing comes up.

FWIW here is the output

java.lang.IllegalArgumentException: Could not determine java version from '11.0.5'.
    at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:72)
    at org.gradle.api.JavaVersion.current(JavaVersion.java:82)
    at org.gradle.internal.jvm.UnsupportedJavaRuntimeException.javaDeprecationWarning(UnsupportedJavaRuntimeException.java:36)
    at org.gradle.tooling.internal.consumer.ConnectorServices.checkJavaVersion(ConnectorServices.java:59)
    at org.gradle.tooling.internal.consumer.ConnectorServices.createConnector(ConnectorServices.java:37)
    at org.gradle.tooling.GradleConnector.newConnector(GradleConnector.java:85)
    at core.MiscSpec.the help message should say where the log file is located(misc_tests.groovy:116)

来源:https://stackoverflow.com/questions/59514817/gradleconnector-could-not-determine-java-version-from-11-0-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!