xxxxxxxxxx
To build a Flutter app for Android, Kotlin 1.5.31 or greater is required.
If your app uses a lower version, you will receive the following error message:
content_copy
┌─ 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 │
│ <path-to-app>/android/build.gradle: │
│ ext.kotlin_version = '<latest-version>' │
│ │
└──────────────────────────────────────────────────────────────────────────┘
xxxxxxxxxx
buildscript {
ext.kotlin_version = '1.5.30'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}