How to change the Version in AndroidStudio?

Viewed 819

I get the follwing message when I want to build:

e: This version (1.0.1) of the Compose Compiler requires Kotlin version 1.5.21 
but you appear to be using Kotlin version 1.5.30 which is not known to be compatible. 
 Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 713ms

Does someone know how to change the version?

Any help is apreciated

1 Answers

You have to change the Kotlin version in the project-level build.gradle file:

dependencies {
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21'
    }

And also in the app-level build.gradle file.

dependencies {
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.21'
}
Related