Run single kotlin class with main function in android studio

后端 未结 15 784
后悔当初
后悔当初 2020-12-13 13:04

I am trying to get familiar with Kotlin to use in my android apps. So first I want to try out some simple kotlin examples, just to get familiar with syntax of kotlin.

<
15条回答
  •  臣服心动
    2020-12-13 13:05

    class Main {
    companion object {
        @JvmStatic fun main(args: Array) {
            println("Hello!")
        }
    }
    

    or Just create a configuration with the main class as "MainKt".

提交回复
热议问题