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