ios环境
brew安装太慢,先设置镜像,使用中科大的镜像。替换brew.git
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
替换homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
配置环境变量,需要设置一下pub源,方便使用别人写的库。
vim ~/.bash_profile
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
如果碰到Error: Permission denied @ unlink_internal
执行
sudo chown -R "$(whoami)":admin /usr/local/bin
brew link --overwrite node
cocoapods安装太慢 https://blog.csdn.net/iotjin/article/details/81603148https://github.com/CocoaPods/Specs拷贝下来
startup lock
rm ./flutter/bin/cache/lockfile