For a greenfield Kotlin-Android project, what Java...
# android
c
For a greenfield Kotlin-Android project, what Java version should I be targeting? Currently I’m using 11 but I’m wondering if there’s any benefit to later versions? Thanks for any advice.
c
I guess you should still use 1.8 as your target version. Android does not run on a Java VM but on Dalvik. https://developer.android.com/studio/write/java8-support#kts
g
It's incorrect, d8 supports even newer versions of target JVM, not all API, but it is also true for 1.8 I think you should target 11, and later migrate on 17, when it will be officially supported
☝️ 1
Even newer versions are fine, at least Java 16 works fine for me. But again, for Kotlin project it's not so much a problem
c
Thanks for responding!