突然在项目中我得到了一个错误“ import js.dart”或类似的错误。我找到了一个命令提示“ flutter channel beta”,所以我进行了更改,升级,之后一切都没有了。
当我在flutter中运行任何命令时,我会收到错误消息:
Building flutter tool...
The current Dart SDK version is 2.10.0-0.0.dev.flutter-a3815b6590.
Because flutter_tools depends on collection >=1.15.0-nnbd <1.15.0-nullsafety.2 which
requires SDK version >=2.9.0-18.0 <=2.9.10, version solving failed.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...
提前谢谢
答案 0 :(得分:2)
我只是CD到Flutter根文件夹,然后“ git pull origin –ff-only”,最后键入“ flutter upgrade”。