美文网首页
Flutter新建项目时遇到Because flutterapp

Flutter新建项目时遇到Because flutterapp

作者: HMZZS | 来源:发表于2020-11-17 13:13 被阅读0次

新建一个flutter项目的时候,报了一个这样的错误:

D:\>flutter create demo
Recreating project D:\demo...
Because demo depends on cupertino_icons any which doesn't exist (could not find package cupertino_icons at https://storage.flutter-io.cn), version solving failed.
pub get failed (server unavailable) -- attempting retry 1 in 1 second...
Because demo depends on cupertino_icons any which doesn't exist (could not find package cupertino_icons at https://storage.flutter-io.cn), version solving failed.
pub get failed (server unavailable) -- attempting retry 2 in 2 seconds...
Because demo depends on cupertino_icons any which doesn't exist (could not find package cupertino_icons at https://storage.flutter-io.cn), version solving failed.
pub get failed (server unavailable) -- attempting retry 3 in 4 seconds...
Running "flutter pub get" in demo...

问题的解决方案

PUB_HOSTED_URL "https://pub.flutter-io.cn"
FLUTTER_STORAGE_BASE_URL "https://storage.flutter-io.cn"

把上面添加到用户变量里面如下图所示

环境变量

相关文章

网友评论

      本文标题:Flutter新建项目时遇到Because flutterapp

      本文链接:https://www.haomeiwen.com/subject/mpexiktx.html