[!] Your project requires a newer version of the Kotlin Gradle plugin.

So since moving to flutter 2.8 I have come across this error in a few of my new projects. The project is basically mad because it wants a higher version of Kotlin. I have also seen this happen in a few of my CI/CD flows on Codemagic.

Now the fix:

  1. Open up your project level build.gradle file: Android > build.gradle
  2. In the buildscript area you will see a specification for ext.kotlin_version
  3. We need to change that to version: "1.6.10"

That should sort you out. Hope this helps someone 👍🏾

if(window.strchfSettings === undefined) window.strchfSettings = {}; window.strchfSettings.stats = {url: "https://itskofio.storychief.io/en/flutter-error-execution-failed-for-task-app-compiledebugkotlin?id=631878249&type=26",title: "Flutter error: Execution failed for task ':app:compileDebugKotlin'.",id: "46ac73b7-33eb-4344-b51f-39dd7bede810"}; (function(d, s, id) { var js, sjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {window.strchf.update(); return;} js = d.createElement(s); js.id = id; js.src = "https://d37oebn0w9ir6a.cloudfront.net/scripts/v0/strchf.js"; js.async = true; sjs.parentNode.insertBefore(js, sjs); }(document, 'script', 'storychief-jssdk'))

More Stories, Tips and tricks
Solving the Gradle Error: 'Failed to calculate the value of task' in Flutter
Stuck with a persistent Gradle error in your Flutter project? Discover a quick fix for the 'Failed to calculate the value of task' error and get your project back on track.
Read more
Google Play Developer: Target SDK API Level 33 Deadline
Unlock Success: Google Play Developer Deadline Secrets Revealed! Don't miss out on crucial insights
Read more
Telegram: Get a channel Id from Telegram
Working with a Telegram bot is awesome. Here are some pointers.
Read more