首页 > 解决方案 > 使用 Gradle 6.6.1 构建 JavaFXPorts 项目时出错

问题描述

错误日志:

FAILURE: Build failed with an exception.

* What went wrong:

    A problem occurred configuring root project 'Mobile'.
    > Could not create task ':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.

无论如何,听说它不支持较新的 Gradle 版本 - 如果是这种情况,我应该降级到哪个旧版本的 Gradle?

我的 build.gradle:

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

apply plugin: 'org.javafxports.jfxmobile'

repositories {
    jcenter()
}
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'application'

mainClassName = 'Mobile.Main'


dependencies {
    testImplementation     'junit:junit:4.13'
}

标签: javafxjavafxports

解决方案


推荐阅读