I have the following issue: I have a flutter project opened with Android Studio. Inside Android Studio's terminal I run flutter packages get
Command fails with the following error:
Running "flutter packages get" in flutterfoodorderingapp...
The current Dart SDK version is 2.1.0-dev.4.0.flutter-050561fd82.
Because food_ordering_app depends on flutter_map <0.1.0 which requires
SDK version >=1.8.0 <2.0.0, version solving failed.
pub get failed (1)
Any ideas how to solve it?
To upgrade to a new version of the package, for example to use new features in that package, run flutter pub upgrade (Upgrade dependencies in IntelliJ or Android Studio) to retrieve the highest available version of the package that is allowed by the version constraint specified in pubspec. yaml .
Running "flutter packages get" in flutterfoodorderingapp... The current Dart SDK version is 2.1.0-dev.4.0.flutter-050561fd82.
Because food_ordering_app depends on flutter_map <0.1.0 which requires SDK version >=1.8.0 <2.0.0, version solving failed.
The package can only be used with SDK version 2.0.0 and below, the developer needs update the package to support the latest version of the Dart SDK (at time of writing is 2.1.0-dev.4.0). There isn't much you can do about this other than downgrading your SDK to use this particular package which might have a negative knock on effect on other packages. Or you could copy the package into your application or clone the repository and modify it yourself if you have access to it.
As per the error message
And flutter_map < 0.1.0 requires SDK version >=1.8.0 <2.0.0
So either you have to downgrade your SDK to >=1.8.0 <2.0.0 or upgrade your flutter_map to be ^0.1.0.
It is preferred to upgrade your flutter_map
to the version which supports your Dart SDK version. As per changelog, you can use flutter_map: ^0.1.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With