skip to Main Content

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.

2

Answers


  1. 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

    Login or Signup to reply.
  2. 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"

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search