Run single kotlin class with main function in android studio

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

    The easiest way is to create a new Java library module like this, and configure it for Kotlin.

    You also have to add this in your build.gradle of the imported module:

    dependencies {
        runtimeClasspath files(compileKotlin.destinationDir)
    }
    

提交回复
热议问题