Your project requires a newer version of the Kotlin Gradle plugin. │
│ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then │
│ update C:UsersMeet │
│ PatilDesktopmine-flutter-learninggps_location_appandroidbuild.gradle: │
│ ext.kotlin_version = ”
Issue Description :
i am getting this error when ran the command flutter pub add location, i added location plugin in my flutter project because i want the current location of device such as longitude and latitude,tried to solve the issue this it the help of ChatGPT.
ChatGPT -> it told me to add the buildscript in my androidmanifest.xml file because my build.gradle was not having buildscipt : {}, and i changed the ext.kotlin_version = ‘2.0.0’ mention as a new release of official kotlin documentation. But still it is showing me the same error
i Even used the youtube to solve this issue,
youtube -> in youtube, one of the instructor showed to change the kotline version in gradle.setting file. i even made changes in plugin tag where the kotlin version was mentioned but still gettting the same error. it worked in the youtube video not working in my actually flutter project.
if anyone as any idea how it would can be fix please tell me it would be a great help.
Thank you in Advance
1.I tried the chatgpt instruction
2. Even followed the youtube videos
Meet Patil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2
Try this:
Change Kotlin Version in android/build.gradle
accroding to your requirement:
buildscript {
ext.kotlin_version = '1.7.10'
}
And also change the Kotlin version in android/settings.gradle
:
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 //Change here
}