Your project requires a newer version of the Kotlin Gradle plugin.
Table of contents
❗️ What is actually happening?
Recently I downloaded some flutter project from github.
When I ran it, I got an error like below.
🛠 Issue Solved
This error is caused by incompatibility with Flutter version 2.10.1 and Kotlin version.
To solve this error, you need to change ext.kotlin_version
from 1.3.50
to 1.6.10
in android/build.gradle.
buildscript {
ext.kotlin_version = '1.6.10' //change this line.
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}