Using Android Studio
suggest changeAndroid Studio can configure Kotlin automatically in an Android project.
Install the plugin
To install the Kotlin plugin, go to File > Settings > Editor > Plugins > Install JetBrains Plugin… > Kotlin > Install, then restart Android Studio when prompted.
Configure a project
Create an Android Studio project as normal, then press Ctrl + Shift + A. In the search box, type “Configure Kotlin in Project” and press Enter.
Android Studio will alter your Gradle files to add all the necessary dependencies.
Converting Java
To convert your Java files to Kotlin files, press Ctrl + Shift + A and find “Convert Java File to Kotlin File”. This will change the current file’s extension to .kt
and convert the code to Kotlin.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents