flutter 导入项目编译异常

执行 flutter packages get

异常信息

The current Dart SDK version is 2.1.0-dev.9.4.flutter-f9ebf21297.

Because XXX requires SDK version >=2.1.0 <3.0.0, version solving failed.

pub upgrade failed (1)

问题分析

1.flutter sdk自带一个Dart SDK,目录位置位于

flutter\bin\cache\dart-sdk

可通过version查看此文件

2.在flutter sdk目录用git命令切换至指定分支目录即可

查看分支 git tag

拉取分支 git checkout XXX

查看当前分支 git branch

    原文作者:皮特梵
    原文地址: https://www.jianshu.com/p/74bdf4df1ee7
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞