Flutter開(kāi)發(fā) - 卡在?Running "flutter pub get" in xxx
Mac系統(tǒng)
//命令行輸入? ? ?vim~/.bash_profile
//添加下面三行崭篡,
exportPUB_HOSTED_URL=https://pub.flutter-io.cn
exportFLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
exportPATH=/Users/計(jì)算機(jī)名稱/flutter/bin:$PATH//下載的flutterSDK的路徑
//命令行輸入? ? ? source~/.bash_profileflutter-h
Windows 新增兩個(gè)環(huán)境變量
PUB_HOSTED_URL=====https://pub.flutter-io.cnFLUTTER_STORAGE_BASE_URL=====https://storage.flutter-io.cn
執(zhí)行一下 flutter doctor命令
提示 zsh: command not found: flutter
* 解決辦法一(單次解決)
source ~/.bash_profile
* 解決辦法一(永久解決)
1 、執(zhí)行:【open ~/.zshrc 】
2 吧秕、如果 提示文件不存在琉闪,則執(zhí)行:【vim ~/.zshrc 】新建一個(gè)新文件。
3 砸彬、再執(zhí)行【open ~/.bash_profile 】
4 颠毙、把 bash_profile 中的內(nèi)容copy到 zshrc 文件中,保存:【:wq回車】砂碉。
5 蛀蜜、再使用source命令重新加載一下:【source ~/.zshrc】,下次再編輯這個(gè)文件就可以直接執(zhí)行:【open ~/.zshrc】
6 、運(yùn)行【flutter -h 】看生效沒(méi)有