简体   繁体   中英

Visual Studio Code Flutter Cannot Update Dart SDK

Because depends on cupertino_icons >=1.0.1 which requires SDK version >=2.12.0-0 <3.0.0, version solving failed.

whenever I tried to flutter run , flutter pub get , flutter pub upgrade , I got this return in console.. I also have tried flutter update-packages it returns

Flutter is already up to date on channel stable Flutter 1.22.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision 7891006299 (3 weeks ago) • 2020-12-10 11:54:40 -0800 Engine • revision ae90085a84 Tools • Dart 2.10.4

How can I update Dart SDK?

you should use 1.0.0 version of cupertino in your pubspec.yaml. I think there is a problem with new version of cupertino

 cupertino_icons: ^1.0.0

As of 2021-03-10 or earlier, it is no longer necessary to use cupertino_icons 1.0.0 or switch to the beta update channel ( flutter channel beta ). Just upgrade ( flutter upgrade ) and re-run flutter pub get . For details, see issue 72231 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM