I can't run the app on the emulator or on a real device. When I try to run the app from VS Code, it shows this error message:
I tried uninstalling the app and doing flutter clean
.
I can't run the app on the emulator or on a real device. When I try to run the app from VS Code, it shows this error message:
I tried uninstalling the app and doing flutter clean
.
This error just happened to me when I launched the app in the store. I'm correcting it now, change the Location library to Gelocator.
At first I thought it was an error in Flutter 3.7.0, I lowered the version to 3.3.10 and 3.3.9 and the same problem continued. My solution was to change the location library to geolocator. It has almost the same functions, I only had to make a few changes.
No need to change the package I was also facing this issue I just fixed it:
Go into C:\Users\Qc\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\location-4.4.0\android\build.gradle : changed "com.google.android.gms:play-services-location:16.+" to "com.google.android.gms:play-services-location:21.0.1" works
dependencies { api '"com.google.android.gms:play-services-location:21.0.1' implementation "androidx.core:core-ktx:1.3.2" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" }
List item In project at android level go into build.gradle and add this line:
Update: added the required code
configurations.all{
resolutionStrategy{
force "com.google.android.gms:play-services-location:21.0.1"
}
}
This error just happened to me when I launched the app in the store. I'm correcting it now, change the Location library to Gelocator.
At first I thought it was an error in Flutter 3.7.0, I lowered the version to 3.3.10 and 3.3.9 and the same problem continued. My solution was to change the location library to geolocator. It has almost the same functions, I only had to make a few changes.
in my case, got to C:\Users\Md Emarat Hossain\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\location-4.4.0\android\build.gradle and changed "com.google.android.gms:play-services-location:16.+" to "com.google.android.gms:play-services-location:21.0.1" works
© 2022 - 2024 — McMap. All rights reserved.