Module was compiled with an incompatible version of Kotlin.
生活随笔
收集整理的這篇文章主要介紹了
Module was compiled with an incompatible version of Kotlin.
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
問題描述
提示:在項目build的時候報了以下錯誤:
kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.2.解決方案:
在項目工程下的build.gradle中,將ext.kotlin_version 改成 ‘1.6.0’
buildscript {ext.kotlin_version = '1.6.0'repositories {google()mavenCentral()}dependencies {classpath 'com.android.tools.build:gradle:4.1.0'classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"} }allprojects {repositories {google()mavenCentral()} }rootProject.buildDir = '../build' subprojects {project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects {project.evaluationDependsOn(':app') }task clean(type: Delete) {delete rootProject.buildDir }總結
以上是生活随笔為你收集整理的Module was compiled with an incompatible version of Kotlin.的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 8月8日云栖精选夜读 | 阿里资深技术专
- 下一篇: I225 2.5G ubuntu 20.