3

I am creating a JavaFX app in Java 8.

Java 8 is required for JavaFXports.

I have installed absolutely everything required, but on gradle run, I receive this error:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'MealPlanner'.
> 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.

* Get more help at https://help.gradle.org

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

BUILD FAILED in 1s

My Gradle.build is as follows:

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.3.17'
    }
}

apply plugin: 'org.javafxports.jfxmobile'

mainClassName = "src.main.java.MainScreen"

repositories {
    jcenter()
}

jfxmobile {
    ios {
        forceLinkClasses = ['ensemble.**.*']
    }
}

Similar questions have been asked and answered.

It's usually a problem with IntelliJ, and it was solved by updating it, OR by deleting the .gradle file and rebuilding.

However, I am using the Atom text editor, and have tried deleting .gradle, but it has not worked.

And, as you can see, I'm not overwriting anything to do with a 'debug' feature.

Link
  • 317
  • 1
  • 5
  • 17
  • What is your gradle/gradlew version? – José Pereda Jan 18 '20 at 21:03
  • PS D:\Projects\MealPlanner> gradle -version ------------------------------------------------------------ Gradle 6.0.1 ------------------------------------------------------------ Build time: 2019-11-18 20:25:01 UTC Revision: fad121066a68c4701acd362daf4287a7c309a0f5 Kotlin: 1.3.50 Groovy: 2.5.8 Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019 JVM: 1.8.0_241 (Oracle Corporation 25.241-b07) OS: Windows 10 10.0 amd64 – Link Jan 18 '20 at 21:05
  • 1
    You can set the gradle wrapper properties to a lower value (lower than [5.6.2](https://youtrack.jetbrains.com/issue/IDEA-224030)), and use it (not sure if your editor allows changing from gradle to gradlew though). If you are using Java 8 and JavaFXPorts it is advisable to use gradlew 4.10, like in these [samples](https://github.com/gluonhq/gluon-samples/blob/master/fifty-states/gradle/wrapper/gradle-wrapper.properties). – José Pereda Jan 18 '20 at 21:08
  • To confirm, you are suggesting using 'gradle wrapper --gradle-version 4.10'? – Link Jan 18 '20 at 21:16
  • Give it try, that should work. – José Pereda Jan 18 '20 at 22:02
  • @JoséPereda can you have a look at https://stackoverflow.com/questions/60292492/gluon-mobile-project-does-not-work-with-gradle-6 please? – Mark Feb 20 '20 at 17:37

0 Answers0