当前位置:   article > 正文

kotlin 插件更新到1.3.21_kotlin_version 1.3

kotlin_version 1.3
插件已经升级到1.3.21,demo 原来引用的是 1.2.41,太过老旧,升级时遇到各种引用找不到。与大家分享成功后的配置。
  • 1

升级了最新版的 kotlin 插件原来的项目报一下错误,无法正常编译

ERROR: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.0 and higher.
The following dependencies do not satisfy the required version:
root project 'Kotlin' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.41
Affected Modules: app

dependencies{
/** 
过时引用 @Deprecated
kotlin-stdlib-jre7 is deprecated since 1.2.0 and should be replaced with kotlin-stdlib-jdk7 less... (Ctrl+F1) 
Inspection info: This inspection reports that some deprecated dependency is used in Gradle.*/
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.30'
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  1. ext.kotlin_version = ‘1.2.41’ ==> ext.kotlin_version = ‘1.3.21’

  2. implementation ‘org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.30’ 会显示过时,将其替换为最新的版本
    implementation ‘org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.21’ implementation ‘org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.21’

重新同步一下 File -> Sync Project with Gradle Files.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/223394?site
推荐阅读
相关标签
  

闽ICP备14008679号