0

I am finishing a project written by someone else. The project is written in Kotlin, but I could not get their build system (wemi) to recognize JavaFX, and so I ported it to Gradle instead, since the JavaFX developers have approved instructions for using Gradle (see those here). Gradle downloads these dependencies normally, and IntelliJ lists them in my external libraries, but I cannot import them into my code.

I am using JVM 11 and Kotlin 1.3.31 with JavaFX 11.0.2. I have followed these instructions to the letter, and it still does not work.

The error is upon importing classes from JavaFX. When I attempt to import a class from any JavaFX module, IntelliJ fails to resolve the 'javafx' package. No other errors appear. By all accounts, if the dependency shows in my dependency list, I should be able to import it, but this is not the case. What can I do to fix this?

smithb99
  • 1
  • 1
  • 3
  • 1
    Are you using modules? Is this only a problem with IntelliJ or does the code fail to compile when using Gradle as well? Can you show us your build file, please? – Slaw Jun 08 '19 at 06:55
  • Make sure you have specified these dependencies for the [Gradle source set](https://docs.gradle.org/current/dsl/org.gradle.api.tasks.SourceSet.html) Use `gradle dependencies` command to see the list of dependencies for each source source https://stackoverflow.com/a/12289367/2000323 – Andrey Jun 10 '19 at 06:13

0 Answers0