How To Get Started With Kotlin Android?

Kotlin is a statically typed programming language developed by JetBrains, which is designed to run on the Java Virtual Machine and also can be compiled to javascript code. While it’s not syntax-compatible with java, Kotlin for Android is designed to interoperate with java code and is reliant on java code from the existing java class library, such as the collection framework.

Kotlin was introduced in 2011 and is named after an island near Saint Petersburg, where the development office behind the project is located. Kotlin has been around for a few years now and Android support came in the second release.

The concise nature drastically reduces the amount of boilerplate code we need to write

Safe, because, it avoids entire classes of errors such as null pointer exceptions

Versatile enough to develop server-side applications, Android apps or front end code running in the browser

The Interoperability helps to leverage existing frameworks and libraries of the JVM with 100% java interoperability.

Steps to setup Kotlin using Android Studio

Android Studio uses Gradle as its build system and part of the effort involved in supporting this environment was adding Gradle support for Kotlin. This tutorial is based on Android Studio 1.2.2 and Kotlin Plugin 0.12.613