Search code examples
androidkotlinandroid-jetpack-compose

This version 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


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!)."


Solution

  • This issue can be fixed by using the exact same versions of Compose compiler & Kotlin. Suppose you are using Compose compiler version = 1.4.8 then you must have to use Kotlin version = 1.8.22 or vice-versa. If you use Kotlin version 1.8.21 then error is inevitable.

    Latest Update : From Kotlin 2.0.0+ you don't have to worry about the compatibility.Use the Compose Compiler Gradle plugin to enable Compose.

    Here is the full list of compatible versions:

    Update : Updated latest versions

    Compose Compiler Version Compatible Kotlin Version
    1.5.12 1.9.23
    1.5.8 1.9.22
    1.5.7 1.9.21
    1.5.6 1.9.21
    1.5.5 1.9.20
    1.5.4 1.9.20
    1.5.3 1.9.10
    1.5.2 1.9.0
    1.5.1 1.9.0
    1.5.0 1.9.0
    1.4.8 1.8.22
    1.4.7 1.8.21
    1.4.6 1.8.20
    1.4.5 1.8.20
    1.4.4 1.8.10
    1.4.3 1.8.10
    1.4.2 1.8.10
    1.4.1 1.8.0
    1.4.0 1.8.0
    1.4.0-alpha02 1.7.21
    1.4.0-alpha01 1.7.20
    1.3.2 1.7.20
    1.3.1 1.7.10
    1.3.0 1.7.10
    1.3.0-rc02 1.7.10
    1.3.0-rc01 1.7.10
    1.3.0-beta01 1.7.10
    1.2.0 1.7.0
    1.2.0-rc02 1.6.21
    1.2.0-rc01 1.6.21
    1.2.0-beta03 1.6.21
    1.2.0-beta02 1.6.21
    1.2.0-beta01 1.6.21
    1.2.0-alpha08 1.6.20
    1.2.0-alpha07 1.6.10
    1.2.0-alpha06 1.6.10
    1.2.0-alpha05 1.6.10
    1.2.0-alpha04 1.6.10
    1.2.0-alpha03 1.6.10
    1.2.0-alpha02 1.6.10
    1.2.0-alpha01 1.6.10
    1.1.1 1.6.10
    1.1.0 1.6.10
    1.1.0-rc03 1.6.10
    1.1.0-rc02 1.6.10
    1.1.0-rc01 1.6.0
    1.1.0-beta04 1.6.0
    1.1.0-beta03 1.5.31
    1.1.0-beta02 1.5.31
    1.1.0-beta01 1.5.31
    1.1.0-alpha06 1.5.31
    1.1.0-alpha05 1.5.31
    1.0.5 1.5.31
    1.0.4 1.5.31
    1.1.0-alpha04 1.5.30
    1.1.0-alpha03 1.5.30
    1.0.3 1.5.30
    1.1.0-alpha02 1.5.21
    1.1.0-alpha01 1.5.21
    1.0.2 1.5.21
    1.0.1 1.5.21
    1.0.0 1.5.10
    1.0.0-rc02 1.5.10
    1.0.0-rc01 1.5.10