Hey all, Any have any ideas why my main method for...
# multiplatform
s
Hey all, Any have any ideas why my main method for Java is not working? I have defined a
Main.kt
in
commonMain
(no packages) with this Gradle file, but I am running into "Error: Could not find or load main class MainKt Caused by: java.lang.ClassNotFoundException: MainKt". I checked the wizard, but it's all specifically for Compose. The IntelliJ Wizard also seem to have an option in this direction.
1
Found
mainRun
in the
jvm { }
DSL but doesn't seem to work.
Copy code
jvm {
  mainRun { mainClass = "MainKt" }
  withJava()
}
I was able to fix it using
mainRun
, it seems quite some stuff changed in Gradle since last having to update this project.