When trying to work with the new versions of the geolocation or location packages it gives me the 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 │ │ <path-to-app>/android/build.gradle: │ │ ext.kotlin_version = '<latest-version>
This error gives us the reason that the location and geolocation packages are constantly updated and you need to access the new versions of Kotlin, so if you work with a project before of Flutter, you may have this error, it is very easy to solve it, for this you must access to 'proyecto/android/settings.gradle' You must change the following line of code for the new version of Kotlin, which is currently V 2.0.0 and eliminate the line of code that has V 1.7.10. You must also eliminate the '+' sign.
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
- id "org.jetbrains.kotlin.android" version "1.7.10" apply false
+ id "org.jetbrains.kotlin.android" version "2.0.0" apply false
}
it should stay like this:
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "2.0.0" apply false
}
CoWith that your project should work correctly