The binary version of its metadata is 1.7.1, expected version is 1.5.1

Viewed 4560

C:/Users/khare/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.7.0/51736992f422993a1e741051bdf3c12801bc1ca1/kotlin-stdlib-common-1.7.0.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.

What should I do ? How to fix it ?

3 Answers

in (dependencies) inside build.gradle(project) convert from 1.5.x (x) in my case is (20)

 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.20"

to 1.7.10

 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"

enter image description here

Just go to build.gradle(Project:yourProjectName)

Change

plugins {
  ...

  id 'org.jetbrains.kotlin.android' version '1.5.x' apply false

  ...
}

[1.5.x means x version number at your case such as 1.5.1]

To

plugins { 
  ...

  id 'org.jetbrains.kotlin.android' version '1.7.10' apply false

  ...
}

It works at my case..

Related