Flutter version solving failed on google_maps_flutter while running "flutter pub get"
4,058
Solution 1
Try to remove the ^ in pubspec.yaml declaration
google_maps_flutter: ^0.5.33
to google_maps_flutter: '0.5.33'
If I'm not mistaken, the ^ means take this version or higher.
Solution 2
Follow up the steps:
flutter channel stable
flutter upgrade
Then Try again if you get the same error then
just change in your pubspec.yaml file:
from this
google_maps_flutter: ^0.5.33
to this
google_maps_flutter:
It will automatically work as it will find out the version which is compatible itself.
Author by
Faizan Kamal
Updated on December 26, 2022Comments
-
Faizan Kamal over 1 year
I'm getting below message in output while running
flutter pub get
even though I've downgraded google map package togoogle_maps_flutter: ^0.5.33
which is<1.0.0
.[proj_name] flutter pub get Running "flutter pub get" in proj_name... The current Flutter SDK version is 1.22.0-9.0.pre. Because proj_name depends on google_maps_flutter >=1.0.0 which requires Flutter SDK version >=1.22.0 <2.0.0, version solving failed. pub get failed (1; Because proj_name depends on google_maps_flutter >=1.0.0 which requires Flutter SDK version >=1.22.0 <2.0.0, version solving failed.) exit code 1
Code snippet of
pubspec.yaml
version: 1.0.0+1 environment: sdk: ">=2.7.0 <3.0.0" dependencies: flutter: sdk: flutter google_maps_flutter: ^0.5.33
Result of
flutter --version
Flutter 1.22.0-9.0.pre • channel unknown • unknown source Framework • revision 7a43175198 (3 months ago) • 2020-08-28 23:18:04 -0400 Engine • revision 07e2520d5d Tools • Dart 2.10.0 (build 2.10.0-73.0.dev)