| - | - |
-
安裝brew報錯
連接ios真機設(shè)備時窗看,要求安裝homebrew,進入homebrew復(fù)制安裝指令/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
運行后報錯
fatal: unable to access ‘https://github.com/Homebrew/brew/
解決
更換brew下載源地址為國內(nèi)/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
-
執(zhí)行brew install報錯m4
image.png
解決
git路徑問題造成,執(zhí)行
brew -v
會發(fā)現(xiàn)輸出如git config --global --add safe.directory /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
,將該類指令終端執(zhí)行
-
Flutter無法啟動iOS Simulator
第一次運行時,點擊open iOS Simulator后能正常啟動iOS模擬器暇矫,并且可以選擇模擬器運行。
后面再使用時怎么都無法選擇ios模擬器
解決
終端運行flutter doctor
發(fā)現(xiàn)出現(xiàn)報錯
[!] 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
運行報錯內(nèi)容中的 兩個sudo命令解決問題