close

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

I am trying to run my flutter project But I am facing the following error: Your project requires a newer version of the Kotlin Gradle plugin in Flutter. We are going to Learn about All Possible Solutions So Lets Get Start with This Article.

How Your project requires a newer version of the Kotlin Gradle plugin Error Occurs ?

I am trying to run my flutter project But I am facing the following error.

BUILD FAILED in 8s
[!] 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 project/android/build.gradle:
    ext.kotlin_version = '<latest-version>'
Exception: Gradle task assembleDebug failed with exit code 1

How To Solve Your project requires a newer version of the Kotlin Gradle plugin Error ?

  1. How To Solve Your project requires a newer version of the Kotlin Gradle plugin Error?

    To Solve Your project requires a newer version of the Kotlin Gradle plugin Error First Of all, Just Open Your Your_Project_Name/android/build.gradle File. And Then Change ext.kotlin_version to 1.6.10 in buildscript. Here is an Example: ext.kotlin_version = '1.6.10' Now, Your error must be solved. Thank You.

  2. Your project requires a newer version of the Kotlin Gradle plugin

    To Solve Your project requires a newer version of the Kotlin Gradle plugin Error First Of all, Just Open Your Your_Project_Name/android/build.gradle File. And Then Change ext.kotlin_version to 1.6.10 in buildscript. Here is an Example: ext.kotlin_version = '1.6.10' Now, Your error must be solved. Thank You.

Solution 1: Change ext.kotlin_version in build.gradle

First Of all, Just Open Your Your_Project_Name/android/build.gradle File. And Then Change ext.kotlin_version to 1.6.10 in buildscript. Here is an example.

Your_Project_Name/android/build.gradle

buildscript {
    ext.kotlin_version = '1.6.10' // Change here to 1.6.10
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

Then Just Restart Your App. Now, Your error must be solved. Thank You.

Summary

It’s all About this error. Hope We solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment