Kotlin/Native supports Android as target platform. What is the difference with using the kotlin-jvm compiler to target Android?
n
napperley
05/15/2019, 9:21 PM
When Kotlin is used to create a program for Android the kotlinc compiler is used (if using Kotlin Android developer platform). Android programs don't use the JVM. Instead they use either Dalvik or ART (the current Android runtime).
napperley
05/15/2019, 9:23 PM
If Kotlin Native (developer platform) is used to create a program for Android then the konan compiler is used, which creates a ELF file (a Linux binary that works on Android).
👍 2
r
russhwolf
05/15/2019, 9:30 PM
From a practical perspective, the Kotlin JVM target works on Android in places where you'd traditionally write Java code, and the Kotlin/Native Android target works in places where you'd traditionally use the NDK and write C/C++ code.