【发布时间】:2020-07-23 15:13:51
【问题描述】:
我正在尝试简单地运行 Gluon 单场景示例。这是我的 gradle 输出:
Configuration on demand is an incubating feature.
> Configure project :GluonApplicationApp
Project :GluonApplicationApp => no module-info.java found
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':GluonApplicationApp'.
> Could not create task ':GluonApplicationApp:debug'.
> Unnecessarily replacing a task that does not exist is not supported. Use create() or register() directly instead. You attempted to replace a task named 'debug', but there is no existing task with that name.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
我的 build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.17'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.gluonapplication.GluonApplication'
dependencies {
compile 'com.gluonhq:charm:5.0.2'
}
jfxmobile {
downConfig {
version = '3.8.6'
// Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
plugins 'display', 'lifecycle', 'statusbar', 'storage'
}
android {
manifest = 'src/android/AndroidManifest.xml'
}
}
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.openjfx:javafx-plugin:0.0.9'
}
}
apply plugin: 'org.openjfx.javafxplugin'
我使用的 JDK 版本是 JDK 11,我尝试了各种 gradle 版本。对于我的 IDE,我使用 netbeans。
我整天都在尝试解决这个问题。请帮助
【问题讨论】:
-
您正在使用在 Java 1.8 上运行的“旧”
jfxmobile插件。要使用 Java/JavaFX 11+,您需要使用新的客户端插件。请参阅:github.com/gluonhq/client-samples 和 docs.gluonhq.com/client -
我尝试了这些说明。现在,我明白了:pastebin.com/LWE74nzA
-
错误很明显:
GraalVM installation directory not found. Either set GRAALVM_HOME...照这里说的做:github.com/gluonhq/client-samples#linux-and-android -
$ echo $GRAALVM_HOME 输出:/home/ubuntu/ProgramFiles/graalvm-ce-java11-20.2.0-dev 已经设置好了,还是我完全错了?
-
从终端,
$GRAALVM_HOME/bin/java -version返回什么?
标签: gradle gluon gluon-mobile