How to I create Android project with "kotlin" as source folder instead of java?

Answered

Hi,

I use IntelliJ IDEA to develop Android application and libraries in Kotlin only. Whenever I create a new Android project the source directory is labeled as "java". I once saw it labeled as "kotlin".. I would like to go for it, but I have troubles renaming the source folder. Also when I add a folder "kotlin" and mark it in project structure as source, it disappears, since the gradle files are not overwritten..

 

How can I set an Android-project's source folder to "kotlin" ?

 

Thnx in advance,

sincerly Matt

0
1 comment

Check these tutorials: https://developer.android.com/kotlin/get-started or https://kotlinlang.org/docs/tutorials/kotlin-android.html

E.g. you need to add Gradle kotlin-android plugin ot build.gradle script and required kotlin dependencies to start working with kotlin in project.

0

Please sign in to leave a comment.