It’s extremely easy to start using Kotlin for Android development. In this tutorial we’ll follow the warming up process with Android Studio. If you're using Intellij IDEA with Android, the process is almost the same.
First, create a new Kotlin Android Project for your application:
Open Android Studio and click Start a new Android Studio project on the welcome screen or File | New | New project.
Select an activity that defines the behavior of your application. For your first "Hello world" application, select Empty Activity that just shows a screen, and click Next.
In the next dialog, provide the project details:
Leave other options with their default values and click Finish.
Once you complete the steps, Android Studio creates a project. The project already contains all the code and resources for building an application that can run on your Android device or an emulator.
The process of building and running the Kotlin application in Android Studio is exactly the same as with Java.
To build and run your application on an emulator:
Select Create New Virtual Device.
Select a device you like and click Next.
Select a system version and download its image.
Verify the emulator configuration and click Finish.
Kotlin has a rather small runtime file size: the library is approximately 964KB (as of 1.3.41). This means Kotlin adds just a little to .apk file size.
Kotlin compiler produces byte-code, thus there really is no difference in terms of look and feel of Kotlin applications versus those written in Java.
If you want to customize your builds or run configuration, refer to the Android Studio documentation.
© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/docs/tutorials/kotlin-android.html