DEV Community

Cover image for Problem : - Your project requires a newer version of the Kotlin Gradle plugin in Flutter.
Keshav Prajapati
Keshav Prajapati

Posted on

8

Problem : - Your project requires a newer version of the Kotlin Gradle plugin in Flutter.

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 = ''
But You have already changed the "ext.kotlin_version = ''"
and still facing the issue, Here you can follow the steps to solve this problem,
Note :-Editing the Kotlin version in only gradle.build not helps in most cases and you have to edit also in your setting.gradle file and edit your Kotlin version according to your Gradle version

Step-1
Find the version of your gradle , in your Flutter project

Image description

Step-2
Visit this link https://kotlinlang.org/docs/gradle-configure-project.html#apply-the-plugin
and find suitable Kotlin version according to your Gradle version.

Image description

Step-3
go to project folder/android/gradle.build
and write this and if this is already written just edit it according to your gradle version



ext.kotlin_version = 'x.y.z'


Enter fullscreen mode Exit fullscreen mode

in your build.gradle file

Image description

Now go to setting.gradle file and write the Kotlin version as same as you have written in build.gradle file

Image description

Thank you for reading this will for works for you

Sentry mobile image

App store rankings love fast apps - mobile vitals can help you get there

Slow startup times, UI hangs, and frozen frames frustrate users—but they’re also fixable. Mobile Vitals help you measure and understand these performance issues so you can optimize your app’s speed and responsiveness. Learn how to use them to reduce friction and improve user experience.

Read full post →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay