close

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

Hello Guys, How are you all? Hope You all Are Fine. Today I am running my latest flutter project but I am facing following error 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 in Flutter. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How This Error Occurs ?

I am running my latest flutter project but I am facing following error.

[!] 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 You Just need to change Kotlin Version in android/build.gradle to the latest one First of all Open Your Your_Project_Name/android/build.gradle file and then Change the version at ext.kotlin_version line to 1.6.10 which is latest for now. Here is my built.gradle file example: ext.kotlin_version = '1.6.10' Then, Try to build again and 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 You Just need to change Kotlin Version in android/build.gradle to the latest one First of all Open Your Your_Project_Name/android/build.gradle file and then Change the version at ext.kotlin_version line to 1.6.10 which is latest for now. Here is my built.gradle file example: ext.kotlin_version = '1.6.10' Then, Try to build again and Now Your Error Must be Solved. Thank You.

Solution 1: Change Kotlin Version in android/build.gradle

You Just need to change Kotlin Version in android/build.gradle to the latest one First of all Open Your Your_Project_Name/android/build.gradle file and then Change the version at ext.kotlin_version line to 1.6.10 which is latest for now. Here is my built.gradle file example.

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

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

Then, Try to build again and Now Your Error Must be Solved. Thank You.

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment