Run single kotlin class with main function in android studio

后端 未结 15 763
后悔当初
后悔当初 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:29

    It is supported now (V 3.2.1 )

    I just finished upgrading my Android studio, created A new project I then waited until all the building finished ( if you are advised to upgrade something please accept )

    After that I created a new Kotlin file and added your code, right click and choose the Run option and that's it .

    I can see the following in the console

    Hello World

    Process finished with exit code 0

提交回复
热议问题