2

I created a default kotlin project in intellij CE 2020.1 (latest).

  1. File->New Project
  2. Selected Java, Project SDK 14 (java version 14.0.1), Kotlin/JVM
  3. Project src root is MyProject
  4. Project structure is MyProject->src->Main.kt
fun main(args: Array<String>) {
    println("Hello World!")
}

In Edit Configurations I try to select Main.kt's main and OK button is disabled.
Cannot run Main class in Intellij

HukeLau_DABA
  • 2,384
  • 6
  • 33
  • 51

1 Answers1

0

In edit > configurations > Main class it should say MainKt (yes, one word, uppercased K). You can write it manually without browsing through project files.

Philip
  • 319
  • 5
  • 13