| - | - |
-
安装brew报错
连接ios真机设备时,要求安装homebrew,进入homebrew复制安装指令/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
运行后报错
fatal: unable to access ‘https://github.com/Homebrew/brew/
解决
更换brew下载源地址为国内/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
-
执行brew install报错m4
解决
git路径问题造成,执行
brew -v
会发现输出如git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
,将该类指令终端执行
-
Flutter无法启动iOS Simulator
第一次运行时,点击open iOS Simulator后能正常启动iOS模拟器,并且可以选择模拟器运行。
后面再使用时怎么都无法选择ios模拟器
解决
终端运行flutter doctor
发现出现报错
[!] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS
development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
运行报错内容中的 两个sudo命令解决问题