gpt4 book ai didi

JavaFXPlugin编译错误(Java版本)

转载 作者:行者123 更新时间:2023-11-30 05:24:53 29 4
gpt4 key购买 nike

我正在尝试运行来自 ArcGIS github here 的一些示例代码.

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

Cause: org/openjfx/gradle/JavaFXPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 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'
}

到目前为止我已经尝试过

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

enter image description here

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

更新

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

enter image description here

类似问题here - 但没有答案。

如何修复此错误?

最佳答案

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

File>Settings>Build, Execution, Deployment>Build Tools>Gradle

.

enter image description here

关于JavaFXPlugin编译错误(Java版本),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58866316/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com