When I compile I got the above error. My gradle file as below : -
apply plugin: \'com.android.application\'
apply plugin: \'kotlin-android\'
apply plugin: \'
For me the issue was not having the same versions of kotlin I'm my modules and lib so I had to force them to use the same version
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.jetbrains.kotlin') {
details.useVersion versions.kotlin
}
}
}}
From the error, I assume:
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
in your dependencies
in addition to the standard library.
I resolved this by adding this in build.gradle
implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.61"