flutter项目运行到安卓端时报错,错误信息如下
┌─ Flutter Fix ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin. │
│ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then update E:\putao\flutter_project\flutter_leyou_app-main\android\build.gradle: │
│ ext.kotlin_version = '<latest-version>'
大致意思是需要更高的版本的kotlin,所以打开android文件夹下的build.gradle文件的ext.kotlin_version版本改为高点即可
具体版本可以参考https://kotlinlang.org/docs/releases.html#release-details此网站
改完保存后运行就可以了
我项目中是改为1.9.10版本的,大家可根据自己需求更改为需要的即可