https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

Sergio Casero

12/28/2018, 11:51 AM
Hi guys, I'm getting strange issue, I'll try to explain. I have 1 module working with TornadoFX in a MPP project, and I can't run the program well from intellij, the behaviour is: -> run with
gradlew desktop:run
(application plugin) works -> run with
tornado build config
not working -> run with
main method
not working The issue for both is
Could not find or load main class MainKt
Looks like I'm not alone, because this user also gets the issue -> https://stackoverflow.com/questions/48777697/kotlin-multi-platform-error-could-not-find-or-load-main-class-mainkt
l

Liliia

12/28/2018, 12:08 PM
Do you have Android among the targets? Seems like it might be the problem: https://youtrack.jetbrains.com/issue/KT-26885
s

Sergio Casero

12/28/2018, 5:40 PM
I have Android also, but android works perfect in the android module
l

Liliia

12/28/2018, 5:43 PM
Yes, I understand. The problem is that its presence affects the generated run configuration and as result happens what is described in the bug above. As a temporary workaround, you may define
run
task as it said at the bug comments
s

Sergio Casero

12/28/2018, 5:55 PM
Ok, thanks!
2 Views