新建flutter項目獲取不到package踩坑記錄

問題描述:

got socket error trying to find package cupertino_icons at https://pub.dary....
pub get failed (69) -- attempting retry 8 in 64 seconds...socket

問題解決:

我用的是win7,在環境變量 -> 用戶變量中添加了這2個變量:spa

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

clipboard.png

從新建立項目:

vscode: ctrl+shift+p --> flutter create
命令行: flutter create 項目名(只能小寫字母和下劃線組合)命令行

相關文章
相關標籤/搜索