"Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.16"
Solution 1:
For someone who is still looking for answer to this, here is the working solution for this problem. In your project level open build.gradle
file, increase the
ext.kotlin_version
from whatever current version that you have like 1.5.0
, to the latest stable version 1.6.0
. Thanks
You can get latest version from here:
https://kotlinlang.org/docs/releases.html#release-details
Solution 2:
Happened to me when updating from Kotlin 1.4.30
to 1.5.0
. Seems to be some sort of Gradle
caching issue. I was able to resolve it by updating Gradle
from 6.7.1
to 6.9
(or any other version).
Just go to gradle-wrapper.properties
and change this line from
distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-all.zip
to
distributionUrl=https://services.gradle.org/distributions/gradle-6.9-all.zip
Solution 3:
I updated kotlin versions to latest and it helped me.
Here
And fixed yellow prompt by Android Studio from this
implementation "androidx.core:core-ktx:+"
to this
implementation "androidx.core:core-ktx:1.5.0"
Solution 4:
In my case Problem occurs when I upgrade androidx.core:core-ktx:1.3.1
to androidx.core:core-ktx:1.6.0
In release notes of this library mentioned that
Note: Core and Core-ktx Version 1.5.0 and above versions will only compile against the Android 11 SDK.**
https://developer.android.com/jetpack/androidx/releases/core#core_and_core-ktx_version_150_2
Solution: downgrade your library below to 1.5.0 and sync. if this is the case then the error will be gone.
Solution 5:
I was facing same issue in IntelliJ IDEA Version: Ultimate 2019.3
Issue occurred when I changed jar version multiple times and click on debug button to run the application.
Issue fixed when i used below steps:
Open IntelliJ >> Build >> Rebuild Project.
After that I run the application again and it worked for me.