'Requires SDK version >=2.16.0 <3.0.0, version solving failed
The current Dart SDK version is 2.14.4.
Because trackkit requires SDK version >=2.16.0 <3.0.0, version solving failed. pub finished with exit code 1
My pubspec.yaml :
environment:
sdk: ">=2.16.0 <3.0.0"
after running flutter master:
Flutter is already up to date on channel master
Flutter 2.13.0-0.0.pre.145 • channel master • https://github.com/flutter/flutter.git
Framework • revision de4eb16254 (3 hours ago) • 2022-03-18 06:00:24 -0400
Engine • revision edf31ab695
Tools • Dart 2.17.0 (build 2.17.0-220.0.dev) • DevTools 2.11.4
It shows that my Dart is upgraded to 2.17.0 ? I am still unable to run!
Solution 1:[1]
You need to upgrade your Dart SDK with:
flutter upgrade
make sure to edit your environment in pubspec.yaml :
environment: sdk: ">=2.16.0 <3.0.0"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Mostafa Mahmoud |