当前位置:   article > 正文

kotlin 插件更新到 1.2.41 程序出错 Please use kotlin-stdlib-jdk7 instead_org.jetbrains.kotlina:kotlin-stdlib-jdk7

org.jetbrains.kotlina:kotlin-stdlib-jdk7

buildscript {
    ext.kotlin_version = '1.2.41'
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

C:\Users...\kotlin-stdlib-jre7-1.2.41.jar: kotlin-stdlib-jre7 is deprecated. Please use kotlin-stdlib-jdk7 instead

出错地方 module build.gradle

implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" 会显示已经过时

将 org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version 改为 org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version

并编译。

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.android.support:design:27.1.1'
    }

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号