Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Requires SDK version >=2.16.0 <3.0.0, version solving failed

Tags:

flutter

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!

like image 961
Dugong98 Avatar asked Nov 26 '25 15:11

Dugong98


1 Answers

  1. You need to upgrade your Dart SDK with:

    flutter upgrade
    
  2. make sure to edit your environment in pubspec.yaml :

    environment:
      sdk: ">=2.16.0 <3.0.0"
    
like image 123
Mostafa Mahmoud Avatar answered Nov 28 '25 15:11

Mostafa Mahmoud



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!