Your project requires a newer version of the Kotlin Gradle plugin. (Android Studio)

We Are Going To Discuss About Your project requires a newer version of the Kotlin Gradle plugin. (Android Studio). So lets Start this Flutter Article.

Your project requires a newer version of the Kotlin Gradle plugin. (Android Studio)

How to solve Your project requires a newer version of the Kotlin Gradle plugin. (Android Studio)

You need to change the kotlin version in your android root project, projectName/android/build.gradle, instead of projectName/android/app/build.gradle.
Change the version at ext.kotlin_version line:
buildscript { ext.kotlin_version = '1.6.10' // Change here repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:4.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } }
UPDATE
The above solution will also works if your android part of the project is using java where the dependencies are using kotlin and you’ve encountered the following error:
Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors e: /home/user/.gradle/caches/transforms-3/36814238b86d8b6b6f9e4e1263bce879/transformed/jetified-kotlinx-coroutines-core-jvm-1.5.2.jar!/META-INF/kotlinx-coroutines-core.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
AndroidStudio or IntelliJ Idea will give hint in the project build.grade file if the kotlin is not the same with the installed kotlin in the IDE.

Your project requires a newer version of the Kotlin Gradle plugin. (Android Studio)

You need to change the kotlin version in your android root project, projectName/android/build.gradle, instead of projectName/android/app/build.gradle.
Change the version at ext.kotlin_version line:
buildscript { ext.kotlin_version = '1.6.10' // Change here repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:4.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } }
UPDATE
The above solution will also works if your android part of the project is using java where the dependencies are using kotlin and you’ve encountered the following error:
Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors e: /home/user/.gradle/caches/transforms-3/36814238b86d8b6b6f9e4e1263bce879/transformed/jetified-kotlinx-coroutines-core-jvm-1.5.2.jar!/META-INF/kotlinx-coroutines-core.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
AndroidStudio or IntelliJ Idea will give hint in the project build.grade file if the kotlin is not the same with the installed kotlin in the IDE.

Solution 1

You need to change the kotlin version in your android root project, projectName/android/build.gradle, instead of projectName/android/app/build.gradle.

Change the version at ext.kotlin_version line:

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

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

UPDATE

The above solution will also works if your android part of the project is using java where the dependencies are using kotlin and you’ve encountered the following error:

Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
e: /home/user/.gradle/caches/transforms-3/36814238b86d8b6b6f9e4e1263bce879/transformed/jetified-kotlinx-coroutines-core-jvm-1.5.2.jar!/META-INF/kotlinx-coroutines-core.kotlin_module: 
Module was compiled with an incompatible version of Kotlin. 
The binary version of its metadata is 1.5.1, expected version is 1.1.15.

AndroidStudio or IntelliJ Idea will give hint in the project build.grade file if the kotlin is not the same with the installed kotlin in the IDE.

Original Author ישו אוהב אותך Of This Content

Solution 2

Update your Kotlin to the Latest version. You can see the latest version here

ext.kotlin_version = '1.6.10' //

You can see the latest version of Kotlin from the below link
https://kotlinlang.org/docs/gradle.html#plugin-and-versions

enter image description here

Original Author Umer Waqas CEO Fluttydev Of This Content

Solution 3

I Update Flutter to 2.10.1
and I found All My Project Has Same Error
in app /build.gradl
you change to ext.kotlin_version = ‘1.6.10’enter image description here

enter image description here

Original Author Abdelrahman Mohamed Elakliby Of This Content

Solution 4

change build gradle to this :

classpath 'com.android.tools.build:gradle:4.1.0'

and gradle-wrapper to this :

distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip

Original Author Ary Anzh Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment