Google is doubling down on its support of the Kotlin language for Android mobile development, with the recommendation that all new Android projects be developed in Kotlin, the JVM-based alternative to Java. But while Android development will become “Kotlin-first,” Java and C++ will continue to be supported.
With Kotlin, there is less to type, less to test, and less to maintain, said Chet Haase, who leads the Android UI team at Google, at the Google I/O developer conference in Mountain View, CA. Unlike Java, Kotlin doesn’t require developers to write large amounts of “boilerplate” code. Haase even joked that developers’ typing skills might even be eroding because of this.
[ What is Kotlin? The Java alternative explained. • Tutorial: Get started with Kotlin. • Kotlin frameworks: A survey of JVM development tools. | Keep up with hot topics in programming with InfoWorld’s App Dev Report newsletter. ]
Google’s latest recommendation follows the company’s May 2017 endorsement of Kotlin as a supported language for Android development alongside Java. Since then, Kotlin has become the most popular language for Android development. Today more than 50 percent of professional Android developers use Kotlin.
In line with Google’s Kotlin support, many APIs for Android Jetpack software components are being introduced first for Kotlin developers, and a Kotlin-first reactive UI programming library, Jetpack Compose, is being developed as part of the Android Open Source Project (AOSP). In addition to investing more in tools, both Google and Kotlin inventor JetBrains are offering training in the language.
Google still supports the use of Java and C++ for Android development. Google said the Android toolchain will support Java desugaring for bytecode transformations through Java 10, and desugaring soon will be enabled for popular OpenJDK libraries as well. A new toolchain for C++ also is being offered.