JavaFXPlugin 编译错误(Java 版本)

Al *_*ant 13 java intellij-idea

我正在尝试从 ArcGIS github here运行一些示例代码。

当我导入并尝试在 IntelliJ Community 2019 中运行该项目时,出现错误:

原因:org/openjfx/gradle/JavaFXPlugin 已经被更新版本的 Java Runtime(class 文件版本 55.0)编译,这个版本的 Java Runtime 只能识别到 52.0 的类文件版本

我的 build.gradle:

plugins {
    id 'application'
    id 'org.openjfx.javafxplugin' version '0.0.8'
}

ext {
    arcgisVersion = '100.6.0'
}

repositories {
    jcenter()
    maven {
        url 'https://esri.bintray.com/arcgis'
    }
}

configurations {
    natives
}

dependencies {
    compile "com.esri.arcgisruntime:arcgis-java:$arcgisVersion"
    natives "com.esri.arcgisruntime:arcgis-java-jnilibs:$arcgisVersion"
    natives "com.esri.arcgisruntime:arcgis-java-resources:$arcgisVersion"
}

javafx {
    version = "11.0.1"
    modules = [ 'javafx.controls' ]
}

task copyNatives(type: Copy) {
    description = "Copies the arcgis native libraries into the .arcgis directory for development."
    group = "build"
    configurations.natives.asFileTree.each {
        from(zipTree(it))
    }
    into "${System.properties.getProperty("user.home")}/.arcgis/$arcgisVersion"
}

run {
    dependsOn copyNatives
    mainClassName = 'com.mycompany.app.App'
}

wrapper {
    gradleVersion = '5.0'
}
Run Code Online (Sandbox Code Playgroud)

到目前为止我尝试过的

我已经下载并安装了 Java 11 SDK。我将 IntelliJ 中的 Java 版本更改为 11。

在此处输入图片说明

即使更改为 Java 11,该错误仍然存​​在。

更新

运行配置窗口不允许我选择 java 版本:

在此处输入图片说明

类似的问题在这里- 但没有答案。

我该如何解决这个错误?

Al *_*ant 26

感谢 CrazyCoder,我找到了答案。我必须在 Intellij 中设置 JDK 版本

文件>设置>构建、执行、部署>构建工具>Gradle

.

在此处输入图片说明