Home > Software design >  This version Compose Compiler requires Kotlin version 1.7.20 but you appear to be using Kotlin versi
This version Compose Compiler requires Kotlin version 1.7.20 but you appear to be using Kotlin versi

Time:01-16

if you get this error in android studio "This version (1.3.2) of the Compose Compiler requires Kotlin version 1.7.20 but you appear to be using Kotlin version 1.8.0 which is not known to be compatible. Please fix your configuration (or suppressKotlinVersionCompatibilityCheck but don't say I didn't warn you!)."

CodePudding user response:

This is because the Kotlin version has been updated but the Compos version has not been updated. So we have to wait for the new version of Compose. If I am wrong, others correct me.

CodePudding user response:

I suppose so. I encountered the same problem. And here is another solution I learned from someone. Add this to module build.gradle in kotlinOptions {}. It is like this:

kotlinOptions {
        // other configurations
        freeCompilerArgs  = [
                "-Xallow-jvm-ir-dependencies",
                "-P",
                "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"]
    }

It works for me, but might have potential bugs.

  • Related