Kotlin:Runtime JAR file has version 1.1 which is older than required for API version 1.2


AndroidStudio出现形如一下的报警:

Warning:/Users/joeyzhao/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.1.2-3/552a40eb47669b78f0f194d526cb21b3aa1f8319/kotlin-stdlib-1.1.2-3.jar: Runtime JAR file has version 1.1 which is older than required for API version 1.2

 

原因:

Kotlin Runtime 的jar包低于coding使用用的的1.2版本。

 

解决:

工程(最外层与settings.build平级的)build.gradle配置:

buildscript {

    ext.kotlin_version = '1.2.0'

    repositories {
     //xxxx 你的配置项
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1' //大于2.3.3
        //xxx 你的配置项
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 
    } 
}

  

 

 

主工程build.gradle配置:

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"

    //xxx 你的配置项
}

  

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM