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

Hello everyone,

despite hours of searching on Google and lots of try&error in Android Studio, I can’t find an explanation that I can understand as to where this error comes from and how I can fix it.

I get this message for several modules:

C:/Users/eltern/.gradle/caches/8.14/transforms/087a1e2dbf168d190aaf77e16d43e487/transformed/navigation-fragment-2.9.0-api.jar!/META-INF/navigation-fragment_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.9999, expected version is 1.7.1.

And the same for

  • lifecycle-livedata-core-2.9.0-api.jar!
  • navigation-runtime-release-api.jar!
  • navigation-ui-2.9.0-api.jar!
    … and some more

I have already made several attempts in Build.gradle, but all of them either result in an error message during the Gradle sync or lead to the list of errors quoted above.
Code

plugins {
// id ‘org.jetbrains.kotlin.android’
// id ‘kotlin-android-extensions’
// id ‘com.android.application’ version ‘8.10.0’ apply false
id ‘com.android.application’
id ‘com.android.library’ version ‘8.10.0’ apply false
id ‘org.jetbrains.kotlin.android’ //version ‘1.9.9999’ apply false
id ‘kotlin-kapt’
id ‘kotlin-android’
}

Somehow it must be possible to find a common kotlin-version for the modules listed above and for the Kotlin version used in the project - but I can’t figure out how to do it. Can anyone here in the forum help me?
I am an android studio newby, just got one app running a year ago and now try to update it to new android version, but can’t figure out what I am doing wrong :-(.

Do you need more information / code snippets to be able to help me?

Version used according to help → about in Androis Studio:

  • Android Studio Meerkat Feature Drop | 2024.3.2
  • Build #AI-243.25659.59.2432.13423653, built on April 29, 2025
  • Runtime version: 21.0.6±13368085-b895.109 amd64
  • VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
  • Toolkit: sun.awt.windows.WToolkit
  • Windows 11.0
  • Kotlin plugin: K2 mode

many thanks for any helpful advice
Siegbert

I have never seen a Kotlin version 1.9.9999, and I don’t think it exists. I would go into your Gradle cache folder and delete those libraries, which will force Gradle to re-download them from Maven Central, or whatever repository you’re using. It honestly seems to me like those files have become corrupt, somehow.

1 Like