简体   繁体   中英

Kotlin on Android - is there a minimum API level requirement?

I am seriously considering using Kotlin on a greenfield Android project, but am concerned about knock-on implications, the most significant of which is a minimum required API level.

On other platforms, new languages have required a certain OS version (eg Swift requiring iOS 7) and I wondered whether there were similar requirements here?

I've been searching through various Kotlin/Android FAQs and Stackoverflow but have not been able to find this information.

No. There's no such requirement for the API level as these two are not directly related. Anyway, see official FAQ

Which versions of Android does Kotlin support?

All of them! Kotlin is compatible with JDK 6, so apps with Kotlin safely run on older Android versions.

Kotlin 1.5 deprecates java 6, and only supports java 8 going forward. So if you are using Kotlin ~1.4 you will have 0 compatability issues.

Not 100% sure which API level becomes the minimum with 1.5+, maybe someone else could shed more light or correct me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM