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

后端 未结 6 4307
花落未央
花落未央 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:19

    Make sure you use the same version of stdlib-jdk7 & kotlin-gradle-plugin dependencies to avoid warnings.
    You can refere below example where stdlib-jdk7 & kotlin-gradle-plugin both have the same version

    app-level build.gradle file

    dependencies {
        implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.0"
        ...
    }
    

    project-level build.gradle file

    buildscript {
        dependencies {
             classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0" 
             ...
        }
    

    }

提交回复
热议问题