The error “Your project requires a newer version of the Kotlin Gradle plugin” can appear when you are trying to compile a Flutter project that involves Kotlin code for Android. The problem is easy to solve, and this guide will show you how.
Cause Of Error “Your project requires a newer version of the Kotlin Gradle plugin”
While Dart is typically the primary programming language for Flutter projects, this framework allows for the use of other languages as well.
In particular, you can add platform-specific code to your Flutter app. For instance, you can call system APIs in Android in languages like Java or Kotin. They allow you to interact directly with those platform-specific APIs.
Coming with Kotlin is building tools like Gradle, which can help you with building and testing. This support increases the flexibility of Flutter apps.
However, Flutter has its own requirements of dependencies. To build an app for the Android platform, Flutter needs Kotlin version 1.5.31 or newer. Otherwise, it will give you this message:
┌─ 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>' │
│ │
└──────────────────────────────────────────────────────────────────────────┘
You are seeing this error because the Kotlin plugin in your IDE has become out-of-date and is no longer compatible with your Flutter version. To get rid of it, update Kotlin and reconfigure your project to match the new version.
Solution
Update Your IDE
All Android Studio and IntelliJ IDEA installations come with a Kotlin plugin built in, which is how Kotlin is used in your projects in the first place. As long as your IDE is updated to its latest version, your Kotlin should be up-to-date too.
Both Android Studio and IntelliJ IDEA feature automatic updates. By default, they should already check for updates frequently and notify you whenever a new version is available.
To manually check for updates in IntelliJ IDEA, go to Help > Check for Updates…
To manually check for updates in Android Studio, select Configure > Check for Update on the landing page or Help > Check for Updates on the toolbar.
Update The Kotlin Plugin
Once your IDE has been updated, you can manually check the version of the Kotlin plugin and update it if necessary too.
- Go to Tools > Kotlin > Configure Kotlin Plugin Updates.
- Select Stable or Early Access Preview in Update channel.
- Select Check again and wait for a few seconds.
- The Install button will appear if there is a new version in your desired update channel. Click it to update your Kotlin plugin.
Change Your Project’s Build
After updating your IDE and its Kotlin plugin, you should change the build configuration of your existing projects.
- Open the <app-src>/android/build.gradle file.
- Change the version number in the ‘ext.kotlin_version’ line in the ‘buildscript’ section to match your current Kotlin version, such as:
buildscript {
ext.kotlin_version = '1.7.10'
Note: if your project is created after the update of the Kotlin plugin, you don’t have to do anything. Just go ahead and start a fresh project like usual. Your IDE will take care of the job and use the current version of the plugin in the build file for you.
Summary
Your IDE will display the error “Your project requires a newer version of the Kotlin Gradle plugin” when its Kotlin plugin is no longer compatible with your Flutter version. Update it, then configure the build file, and the problem should go away.
Maybe you are interested:
- “nodemon.ps1 cannot be loaded because running scripts is disabled on this system”
- ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
- “geom_path: Each group consists of only one observation. Do you need to adjust the group aesthetic”

My name is Robert. I have a degree in information technology and two years of expertise in software development. I’ve come to offer my understanding on programming languages. I hope you find my articles interesting.
Job: Developer
Name of the university: HUST
Major: IT
Programming Languages: Java, C#, C, Javascript, R, Typescript, ReactJs, Laravel, SQL, Python