incompatible version of Kotlin 🤖 Android

Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.0.0, expected version is 1.8.0

A dependency was compiled with a newer Kotlin version than your project’s Kotlin Gradle plugin can read.

Seen on: Android

Meaning

Libraries built with Kotlin 2.x can’t be consumed by Kotlin 1.8 compilers. Upgrading a library (or Firebase/Compose BOM) without upgrading Kotlin triggers it.

Common causes

  • Kotlin Gradle plugin older than a dependency’s Kotlin
  • Mixed Kotlin versions across modules/plugins
  • Compose compiler version tied to an old Kotlin

⚡ Quick fix

  1. Upgrade the Kotlin plugin (and Compose compiler plugin)
  2. Or downgrade the dependency
  3. Align versions in libs.versions.toml

Detailed fix by platform

Gradle

  1. kotlin
    plugins {
      id("org.jetbrains.kotlin.android") version "2.0.21" apply false
      id("org.jetbrains.kotlin.plugin.compose") version "2.0.21" apply false
    }

How to diagnose

  1. Versions — Project Kotlin vs metadata version in error
  2. Dependency — Which jar?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.