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

Time:01-11

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.

CodePudding user response:

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 naw version package official doc example : https://github.com/CodesFirst/new_version_plus/blob/master/example/pubspec.yaml

CodePudding user response:

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"

  • Related