How to view the version of kotlin android studio project is running?

Viewed 23

I was writing an calculator app but ran in some issues. I think it's because of the kotlin version my app uses but I'm not completely sure. How do I see what kotlin version my app uses so I can check if my phone can run the app?

1 Answers

If your project was created in Android Studio in the past ~2 years, it will be the same as the Kotlin plugin version in your top level build.gradle file. For example, in this project, Kotlin 1.6.21 is being used.

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id 'com.android.application' version '7.2.0' apply false
    id 'com.android.library' version '7.2.0' apply false
    id 'org.jetbrains.kotlin.android' version '1.6.21' apply false
}

However, the Kotlin version will not prevent the app from running on some phones. Any version of Kotlin can compile to Java 6 bytecode, which is compatible with the earliest Android phones from about 12 years ago.

Related