Go to android\settings.gradle.kts
and under plugins
update the version of "org.jetbrains.kotlin.android"
to the latest one according to this link: https://kotlinlang.org/docs/releases.html#release-details
For example:
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.7.0" apply false
id("org.jetbrains.kotlin.android") version "2.1.10" apply false
}