Home > Mobile >  please tell me how to change sdk version.I have changed manually in pubspec.yaml but it does not wor
please tell me how to change sdk version.I have changed manually in pubspec.yaml but it does not wor

Time:08-10

i have changed manually in pubspec.yaml file but it does not works.

error: pub get failed (1; Because my_app depends on geolocator >=9.0.1 which requires SDK version >=2.15.0 <3.0.0, version solving failed.)

CodePudding user response:

Try in pubspec.yaml change with

environment:
  sdk: ">=2.15.0 <3.0.0"

CodePudding user response:

  • then try running this in terminal brother,

if you want to downgrade to an specific flutter version

  • flutter downgrade (example: flutter downgrade v1.2.1)

if you want to upgrade to a specific flutter version

  • flutter upgrade (example: flutter upgrade v1.2.1)

then run flutter --version to check the current version.

Have fun and Keep Coding!

  • Related