Skip to content
Latchkey

Compose compiler version incompatible with Kotlin in CI

The Compose compiler plugin is pinned to a specific Kotlin version. When CI resolves a Kotlin version the Compose compiler was not built for, the build fails asking you to match versions (or, on Kotlin 2.0+, to apply the org.jetbrains.kotlin.plugin.compose plugin whose version tracks Kotlin).

What this error means

The build fails with "This version of the Compose Compiler requires Kotlin version X but you appear to be using Kotlin version Y" or a Compose plugin version mismatch.

Kotlin
e: This version of the Compose Compiler requires Kotlin version 1.9.24 but you appear to be
using Kotlin version 2.0.21 which is not known to be compatible.

Common causes

Compose compiler pinned to a different Kotlin

A hardcoded kotlinCompilerExtensionVersion targets a Kotlin version different from what CI resolved, so the two are incompatible.

Not using the Kotlin 2.0 Compose plugin

On Kotlin 2.0+, the Compose compiler moved into the org.jetbrains.kotlin.plugin.compose Gradle plugin whose version follows Kotlin; a stale manual extension version conflicts.

How to fix it

Use the Kotlin 2.0 Compose plugin

Apply the Compose compiler plugin whose version matches your Kotlin version so they stay in sync.

build.gradle.kts
plugins {
    kotlin("jvm") version "2.0.21"
    id("org.jetbrains.kotlin.plugin.compose") version "2.0.21"
}

Match the extension version on older Kotlin

On Kotlin 1.9.x, pin kotlinCompilerExtensionVersion to the value from the Compose to Kotlin compatibility map.

build.gradle.kts
composeOptions {
    kotlinCompilerExtensionVersion = "1.5.14" // matches Kotlin 1.9.24
}

How to prevent it

  • On Kotlin 2.0+, use the compose plugin versioned with Kotlin, not a manual extension.
  • On 1.9.x, follow the Compose/Kotlin compatibility map when bumping either.
  • Bump Kotlin and Compose together in a version catalog.

Frequently asked questions

What causes ""compose compiler ... version" incompatible"?
A hardcoded kotlinCompilerExtensionVersion targets a Kotlin version different from what CI resolved, so the two are incompatible.
How do I fix "compose compiler ... version" incompatible?
Apply the Compose compiler plugin whose version matches your Kotlin version so they stay in sync.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card