Open anmol-me opened 1 month ago
i am also facing the same issue
This is related to geolocator_android 4.6.0 A workaround is to add 4.5.5 to your dependencies until 4.6.0 gets fixed.
This is related to geolocator_android 4.6.0 A workaround is to add 4.5.5 to your dependencies until 4.6.0 gets fixed.
Thanks @rminkler1
Add the following to dependencies: geolocator: ^12.0.0 geolocator_android: 4.5.5
Thanks @rminkler1 Now Its Working Perfectolly
Wow! It works 🤗 You just saved the day. You won't believe that I've been battling with the error for days
Wow! It works 🤗 You just saved the day. You won't believe that I've been battling with the error for days
I do believe you, because I was also battling this for days. I updated Flutter and I thought I broke something with my Flutter install. It took me almost a week to figure out it was this package.
This is related to geolocator_android 4.6.0 A workaround is to add 4.5.5 to your dependencies until 4.6.0 gets fixed.
thank you bro
@anmol-me @rminkler1 what version to use for location package?
geolocator: ^12.0.0 geolocator_android: 4.5.5
@rminkler1 sir i am asking for location package not for geolocator..
@rminkler1 sir i am asking for location package not for geolocator..
Then I'm afraid I don't understand what you are asking. Geolocator is the package that gets the location of the device. This thread is about a bug in the Android implementation of that package and how to workaround that bug until it is fixed. I've only used geolocator once and ran into this bug, so I'm afraid I can't help beyond this.
@Meizzosama Hey, please search if you can find a similar issue with the author of location package. If you can't find it, please raise the issue with the author.
Here is a link to help you get started: https://github.com/Lyokone/flutterlocation/issues
@anmol-me Brother i found the solution. i-e, I haven't updated the kotlin version on file "settings.gradle" that's why it was giving me that error, but later on i fixed it. Thanks a bunch for your reply :)
@rminkler1 thanks, switching to geolocator_android: 4.5.5
saved me hours of researches....
Facing the same problem, after searching for days found out that geolocator causing it. hope it will be fixed soon.
geolocator: ^12.0.0 geolocator_android: 4.5.5
So for some reason when you add
geolocator_android: 4.5.5 it fixes the issue and then you can remove geolocator_android: 4.5.5 afterwards and geolocator: ^12.0.0 will work without it.
- geolocator_android
geolocator: ^12.0.0 still gives an error
- geolocator_android
geolocator: ^12.0.0 still gives an error
Add the following two dependencies: geolocator: ^12.0.0 geolocator_android: 4.5.5
Run the following commands: flutter clean flutter pub get
geolocator: ^12.0.0 geolocator_android: 4.5.5
So for some reason when you add
geolocator_android: 4.5.5 it fixes the issue and then you can remove geolocator_android: 4.5.5 afterwards and geolocator: ^12.0.0 will work without it.
That might happen if you don't re-run pub get. I suspect if you run pub get again, it breaks again.
Thanks @rminkler1, fixed my issue
Please check the following before submitting a new issue.
Please select affected platform(s)
Steps to reproduce
Expected results
Should run without any errors.
Actual results
App doesn't run
Code sample
android\build
app\build
Version
12.0.0
Flutter Doctor output
e: C:/Users/Anmol/.gradle/caches/transforms-3/362b2d499a05b04c0c112f7a304aa7e2/transformed/jetified-kotlin-stdlib-common-1.9.0.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/Anmol/.gradle/caches/transforms-3/a986ff86be3aa69fb7fd119d17309b08/transformed/jetified-kotlin-stdlib-1.9.0.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/Anmol/.gradle/caches/transforms-3/a986ff86be3aa69fb7fd119d17309b08/transformed/jetified-kotlin-stdlib-1.9.0.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/Anmol/.gradle/caches/transforms-3/a986ff86be3aa69fb7fd119d17309b08/transformed/jetified-kotlin-stdlib-1.9.0.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:compileDebugKotlin'.
Try:
Get more help at https://help.gradle.org
BUILD FAILED in 7s
┌─ Flutter Fix ──────────────────────────────────────────────────────────────────────────────┐ │ [!] 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:\Users\Anmol\FlutterProjects\travel_project\android\build.gradle: │ │ ext.kotlin_version = '' │
└────────────────────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1