warning: Kotlin runtime JAR files in the classpath should have the same version

后端 未结 6 4315
花落未央
花落未央 2020-12-05 03:59

I get the following warning, but I\'m not sure where v1.0.6 resides.

Is it possible this error comes from a Kotlin library somehow including an old Kotlin version?

6条回答
  •  被撕碎了的回忆
    2020-12-05 04:21

    I fixed warning by overwriting kotlin version used in my app

    configurations.all {
        resolutionStrategy.eachDependency { DependencyResolveDetails details ->
            def requested = details.requested
            if (requested.group == 'org.jetbrains.kotlin' && requested.name == 'kotlin-reflect') {
                details.useVersion kotlin_version
            }
        }
    }
    

    e.g. kotlin_version = 1.3.0

提交回复
热议问题