Flutter Error: Build Failed with an exception. Your project requires a newer version of the Kotlin Gradle plugin.
If you are new to flutter, you eventually may come across this error.
Do not worry, all you need to do is go to this link -- kotlinlang.org/docs/gradle.html#plugin-and-.. and look for the version as seen here.
Go back to build.gradle file located in android folder.
Update the version number.
Save. This will update the gradle build automatically with the right version and the error will go away.