


Here’s what I changed to get Kotlin wired up in the legacy project:ĪpplicationId "" Next up, we’ll update the project’s adle to support Kotlin. Restart Android Studio before continuing otherwise, it won’t have loaded your new Kotlin plugin! Updating Gradle To add it, select Android Studio > Preferences > Plugins > Install Jetbrains Plugin. To get started, we first need to add the Kotlin IDE plugin in Android Studio.


Given a ticker symbol, StockWatcher looks up the current stock price using a REST API. The project we’ll migrate is called StockWatcher. In this first post, we’ll get our project configured to use Kotlin and run through converting our first file. My colleague David wrote a great introduction to Kotlin programming, and in this series, we’ll learn what Kotlin offers by migrating a 100% Java Android app to a 100% Kotlin Android app. On Android, Kotlin enables a modern programming experience without requiring third-party workarounds that would exclude large percentages of users (Java 8 support on Android requires a minSdk of 24 which excludes 95% of devices) or that would introduce the risk of using Java 8 language features the Android toolchain doesn’t support. If you haven’t yet heard of Kotlin, it’s a modern JVM language in use at companies like Pinterest, Trello, Square, Kickstarter and Google, to list just a few. Now that Google has announced official support for Kotlin on Android, Kotlin is widely viewed as the first viable alternative to Java on Android.
