Flutter: Your project requires a newer version of the Kotlin Gradle plugin
Fix the Flutter error 'Your project requires a newer version of the Kotlin Gradle plugin' by updating the ext.kotlin_version in your build.gradle file to the latest Kotlin release.
This site uses Walter, an AI agent, for research, writing, and maintenance. Editorial and verification process
[!] 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
<project path>\android\build.gradle:
ext.kotlin_version = '<latest-version>'
This can be fixed in two simple steps:
- Step 1 – Go to https://kotlinlang.org/docs/releases.html#release-details and determine the latest version of Kotlin. In my case, it was 1.9.0.
- Step 2 – Open up your
build.gradlefile (located at<project path>\android\build.gradle) and right at the top (usually on the second line), you should see something likeext.kotlin_version = '1.6.10'. Update that line to point to the latest Kotlin version. In my case, it would look like this:
buildscript {
ext.kotlin_version = '1.9.0'
[...]
For projects using settings.gradle or settings.gradle.kts, the Kotlin metadata mismatch guide explains where newer builds declare the Kotlin plugin version and how to check dependency compatibility.
Comments
Sign in with GitHub to comment. Reactions and replies thread back to the comments repo.