6

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?

1

2 Answers 2

6

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a lot for the reply! I cloned the repository, upgraded flatter_map and location packages and modified packages functions used to the project.
1

As per the error message

  1. Dart SDK version is 2.1.0-dev.4.0.flutter-050561fd82 and
  2. flutter_map version is less than 0.1.0.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.