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.
The Android app must have a minimum SDK version 19 or higher. If you want to support devices below API level 19, you must override minSDK version.
When you upload an APK, it must meet Google Play's target API level requirements. New apps must target Android 12 (API level 31) or higher; except for Wear OS apps, which must target Android 11 (API level 30) or higher.
android:minSdkVersion — Specifies the minimum API Level on which the application is able to run. The default value is "1".
Step 1: Open your Android Studio, and go to Menu. File >Project Structure. Step 2: In project Structure window, select app module in the list given on left side. Step 3: Select the Flavors tab and under this you will have an option for setting “Min Sdk Version” and for setting “Target Sdk Version”.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With