Fail to set up TornadoFx project on IntelliJ


#1

Problem solved: #8

I’m trying to set up a TornadoFx project through IntelliJ plugin but it always shows Unresolved tornadofx and Kotlin not configured.


I’ve followed the Github page and set Kotlin api to 1.1, also add compile 'no.tornado:tornadofx:1.7.14' to the Gradle file but none seems to work.
My environment is elementaryOS(Ubuntu 16.04) and openjdk-8 1.8.0_171. I’ve tried Oracle’s JDK but nothing changed. Do I miss something or should I report the problem to the author?

(Edited typo: Ubuntu 18.04 -> 16.04)


#2

I highly recommend you to ask the question on slack, as they are very active.


#3

From the TornadoFX README.md:

Important: TornadoFX is not yet compatible with Java 9/10

It looks like you are using Java 10 which maybe the reason why it doesn’t work


#4

Either the image is a bit misleading or @SackCastellon his answer can help you.


#5

I noticed that, too. Sorry for the misleading image. It was supposed to show TornadoFx options of creating project. I actually change the version to the system built-in 1.8.0_171 but that doesn’t seems to work.


#6

Did you ask on slack already?


#7

I’ll ask it on Slack at home later. I 'm not having my computer around right now.


#8

Problem solved by re-importing the project through the build.gradle file from the IntelliJ starting page. A “Frameworks Detected” notification will then show up.

Thanks for the suggestion from Slack community.


#9

If that is the problem, you can open project explorer using F4 button on project tree and add a facet tornadofx to the module. Usually tornadofx framework detection has some glitches on multi-module builds.


#10

Just in case OpenJDK lurkers will hit this topic I want to note that OpenJDK is not bundled with JavaFX and you might get a similar error, javafx imports won’t be recognized.
If you want to use TornadoFX with OpenJDK (considering that your OS is Ubuntu) there is an answer on StackOverflow on how to add JavaFX to your OpenJDK.

Just install openjfx package and then re-add JDK in your project to force IDEA to reload the classes.