Flutter,Your project requires a newer version of the Kotlin Gradle plugin

到Kotlinglang.org网站,吧kotlin的最新版本填写到projectname/andorid/build.gradle里面即可解决。

buildscript {
    ext.kotlin_version = '1.6.20'
    repositories {
        google()
        mavenCentral()
    }

┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin.                                                                                           │
│ Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then update D:\LaptopBackup\Project\Flutter\e_shop\android\build.gradle: │
│ ext.kotlin_version = '<latest-version>'                                                                                                                          │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Gradle task assembleRelease failed with exit code 1

 

https://kotlinlang.org/docs/gradle.html#plugin-and-versions

 

plugins {
  kotlin("<...>") version "1.6.20"
}
posted @ 2022-04-17 14:19  商君治国安邦之张莽  阅读(2213)  评论(0编辑  收藏  举报