Kotlin错误:"模块是用不兼容的Kotlin版本编译的。其元数据的二进制版本为1.5.1,预期版本为1.1.15"
大家好!我是Android开发新手,使用Kotlin和Flutter。在更新Gradle并将Stripe库(支付)添加到项目后,我在构建时遇到了错误:
```
Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15
```
我正在开发一个电商应用。这是我的`build.gradle`(项目级别):
```kotlin
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
```
而在app模块的`build.gradle`中,我有以下依赖:
```kotlin
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'com.stripe:stripe-android:16.0.0'
implementation 'androidx.core:core-ktx:1.6.0'
}
```