Mohsin Patel
Mohsin Patel

Reputation: 31

Because package_name requires SDK version >=2.17.6 <3.0.0, version solving failed

In my project I am using flutter package new_version_plus but when I use pub get it gives an error as follows:

Because package_name requires SDK version >=2.17.6 <3.0.0, version solving failed. pub get failed (1; Because package_name requires SDK version >=2.17.6 <3.0.0, version solving failed.) exit code 1

I made the changes as per required SDK version but still I got the same error.

Upvotes: 1

Views: 2014

Answers (2)

Yashraj
Yashraj

Reputation: 1009

You need to upgrade flutter using flutter upgrade command and then flutter will use latest version of Dart SDK.

Update 'SDK version >=2.17.6 <3.0.0' like this in pubspec.yaml file.

pls check new version package official doc example : https://github.com/CodesFirst/new_version_plus/blob/master/example/pubspec.yaml

Upvotes: 1

Mansoor Malik
Mansoor Malik

Reputation: 1

You should not update the dart version of this project, open pubspec.yaml file and update

environment: sdk: ">=2.12.0 <3.0.0" or Whatever your sdk version

to

environment: sdk: ">=2.16.0 <3.0.0"

Upvotes: 0

Related Questions