Gradle:运行任务失败[Gluon javafx]

Gradle:运行任务失败[Gluon javafx],java,android,gradle,gluon,javafx-11,Java,Android,Gradle,Gluon,Javafx 11,我刚刚用Intellji的想法创建了一个启动项目。并且gradle构建和任务也成功创建。 详细信息: 等级:5.1.0 jvm:11 javafx:11 下面是初学者项目中使用的build.gradle文件 buildscript { repositories { jcenter() mavenCentral() } dependencies { classpath 'org.javafxports:jfxmobile-pl

我刚刚用Intellji的想法创建了一个启动项目。并且gradle构建和任务也成功创建。
详细信息:
等级:
5.1.0

jvm:
11

javafx:
11

下面是初学者项目中使用的
build.gradle
文件

buildscript {
    repositories {
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.3.17'
    }
}

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

javafx {
    version = "11"
    modules = [ 'javafx.controls' , 'javafx.fxml' ]
}

apply plugin: 'org.javafxports.jfxmobile'

repositories {
    jcenter()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
    }
}

mainClassName = 'com.mainapplication.Application'

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 {
        compileSdkVersion = 25
        androidSdk = 'D:\\@games'
        applicationPackage = 'org.javafxports.ensemble'
        manifest = 'src/android/AndroidManifest.xml'
    }

    ios {
        infoPList = file('src/ios/Default-Info.plist')
        forceLinkClasses = [
                'com.gluonhq.**.*',
                'javax.annotations.**.*',
                'javax.inject.**.*',
                'javax.json.**.*',
                'org.glassfish.json.**.*'
        ]
    }
}


当我执行任务
gettingstartedApp:run
时,我收到以下错误。

Executing task 'run'...

> Task :wrapper

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 0s
1 actionable task: 1 executed
> Task :gettingStartedApp:compileJava
> Task :gettingStartedApp:processResources UP-TO-DATE
> Task :gettingStartedApp:classes
> Task :gettingStartedApp:configJavafxRun
> Task :gettingStartedApp:compileDesktopJava NO-SOURCE
> Task :gettingStartedApp:processDesktopResources NO-SOURCE
> Task :gettingStartedApp:desktopClasses UP-TO-DATE

> Task :gettingStartedApp:run FAILED
Error: --module-path requires module path specification

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':gettingStartedApp:run'.
> Process 'command 'C:\Program Files\Java\jdk-11.0.7\bin\java.exe'' finished with non-zero exit value 1

* 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.

我甚至在Intellji Idea gradle配置中的gradle VM选项中添加了
--module path\path\javafx\lib
,但仍然出现此错误。
请帮我解决这个问题,
提前感谢。

jfxmobile插件和javafx gradle插件都会相互冲突,因为前者会将每个依赖项移动到类路径,并在命令行中留下一个空的
--module path
选项,从而导致异常。jfxmobile插件适用于Java1.8。对于Java 11+,您应该检查新的Gluon客户端插件,从这里开始:。谢谢,我将尝试一下@JoséPereda
[ERROR]未能执行目标com。gluonhq:client maven plugin:0.1.20:build(默认cli)on project hellofx:ERROR,client:build Failed->[Help 1]org.apache.maven.lifecycle.LifecycleExecutionException:未能在hellofx项目上执行目标com.gloonHQ:client maven插件:0.1.20:build(默认cli):错误,客户端:build Failed
mvn clean client:build
@JoséPeredas上出错,如自述文件中所述,此时您需要Linux(用于Linux/Android)或Mac OS(适用于Mac OS/iOS)机器。你检查了先决条件列表了吗?是的,我看到了,我在wsl$bash@JoséPereda上运行了这个命令,两个插件jfxmobile和javafx gradle plugin相互冲突,因为前者将每个依赖项移动到类路径,并在命令行中留下一个空的
--module path
选项,从而导致异常jfxmobile插件适用于Java 1.8。对于Java 11+,您应该检查新的Gluon客户端插件,从这里开始:。谢谢,我将给这些示例一次尝试@JoséPereda
[ERROR]无法执行目标com。gluonhq:client maven插件:0.1.20:build(默认cli)on project hellofx:ERROR,client:build Failed->[Help 1]org.apache.maven.lifecycle.LifecycleExecutionException:未能在hellofx项目上执行目标com.gloonHQ:client maven插件:0.1.20:build(默认cli):错误,客户端:build Failed
mvn clean client:build
@JoséPeredas上出错,如自述文件中所述,此时您需要Linux(用于Linux/Android)或Mac OS(适用于Mac OS/iOS)计算机。您是否检查了先决条件列表?是的,我看到了,并在wsl$bash@JoséPereda上运行了此命令,