Flutter项目构建失败,出现KotlinGradle插件版本错误

3mpgtkmj  于 2023-06-06  发布在  Flutter
关注(0)|答案(1)|浏览(360)

我在构建Flutter项目时遇到了一个错误。错误消息如下:

FAILURE: Build failed with an exception.

 * What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':location' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.20

 * Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

 * Get more help at https://help.gradle.org```

我使用的位置:4.4.0软件包中。有人能帮我解决这个问题吗?
提前感谢你的帮助

zyfwsgd6

zyfwsgd61#

This answer之后,我执行了以下操作:

dependencies {         
classpath 'com.android.tools.build:gradle:7.3.1' // I changed this to 7.2.1 
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"     
}

相关问题