Reputation: 10283
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 (e.g. 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.
Upvotes: 27
Views: 11071
Reputation: 7528
Kotlin when used with recent versions ( at least 2.1.0 ) and they don't even bother to document it, like here : https://kotlinlang.org/docs/kotlin-evolution-principles.html . This stinks. When trying to get a project to compile, it showed min sdk was 24 for 2.1.0. No idea where I can find which version can be used for 21, but clearly this matters.
Upvotes: 0
Reputation: 11
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.
Upvotes: 1
Reputation: 75629
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.
Upvotes: 36