How to fix Your Project requires a newer version of kotlin Gradle plugin in flutter

Techbriel
you may likely experience “Your Project requires a newer version of kotlin Gradle plugin” when you upgrade (flutter upgrade) your flutter SDK to 2.12.0 as of the date of publishing this or even newer in the future.
flutter-build-error_kotlin_version_techbriel Techbriel

If you are a flutter developer and have the flutter version 2.10.0 and below. You may likely experience “Your Project requires a newer version of kotlin Gradle plugin” when you upgrade (flutter upgrade) your flutter SDK to 2.12.0 as of the date of publishing this or even newer in the future.

 Techbriel
Flutter Error Screenshot: Your Project requires a newer version of kotlin Gradle plugin

After upgrading your flutter SDK to 2.12.0 or newer you may not experience any issues while developing your app but you will get this error message especially when you want to run your app in Android emulator.

To fix this simply follow the steps below;

  • Using your favorite IDE i.e VSCode, or Android Studio, Navigate to your Flutter_App/Android/build.gradle
 Techbriel
build.gradle file screenshot
  • Next you replace the current values of ex.kotlin_version to the current version
 Techbriel

The current version can be found in https://kotlinlang.org/docs/gradle.html#plugin-and-versions

This will now be ;

buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        mavenCentral()
    }
 
    dependencies {
        classpath 'com.android.tools.build:gradle:7.0.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}
  • Lastly Save” the file and run your project again and your flutter project will run now without “Your Project requires a newer version of kotlin Gradle plugin” errors again

PS: As of the time of writing this, the versions may have changed but the principle should still apply.

If you experience an internet connectivity issues while upgrading your flutter SDK, then you may have more problems than as stated in this article. One of the problems you may encounter is some of the files not downloading properly.  To fix that, first run “flutter clean” and then you can re-run the command “Flutter upgrade” to ensure all files have been properly downloaded.

If you still have issues building your application, you can Upgrade Flutter project Dependencies. To do this you can run this command in your terminal “Flutter pub upgrade”.

If you enjoyed this post, I’d be very grateful if you’d help it spread by sharing it to your friends using the share button. you can also be the first to get out updates by following us on facebook, twitterlinkedin and instagram. Please also subscribe to our youtube channel for step by step guide on how to implement most of the contents written here.

If you have difficulty fixing this “Your Project requires a newer version of kotlin Gradle plugin” issue and this process didn’t solve your problem please leave us a comment below and possibly with screenshot we will love to assist you. Also if you have solved this problem using other method(s),

Please also share in the comments section below so that it helps someone else.

Total
0
Shares
Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
trackback
2 years ago

[…] How to fix Your Project requires a newer version of kotlin Gradle plugin in flutter […]

Previous Post
 Techbriel

Difference Between Robots.txt and No-index and how it affects your website

Next Post
 Techbriel

Best Programming Language / Framework for Mobile App Development

Related Posts
1
0
Would love your thoughts, please comment.x
()
x
close button