kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar

后端 未结 3 1787
孤街浪徒
孤街浪徒 2020-12-14 13:37

When I compile I got the above error. My gradle file as below : -

apply plugin: \'com.android.application\'
apply plugin: \'kotlin-android\'
apply plugin: \'         


        
相关标签:
3条回答
  • 2020-12-14 14:13

    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
                }
            }
        }}
    
    0 讨论(0)
  • 2020-12-14 14:19

    From the error, I assume:

    implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
    

    in your dependencies in addition to the standard library.

    0 讨论(0)
  • 2020-12-14 14:21

    I resolved this by adding this in build.gradle

    implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.61"
    
    0 讨论(0)
提交回复
热议问题