替換homebrew默認源git
cd "$(brew --repo)" git remote set-url origin git://mirrors.ustc.edu.cn/brew.git
替換homebrew-core源xcode
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin git://mirrors.ustc.edu.cn/homebrew-core.git
使用brew install dart
安裝東西時,提示Xcode outdatedbash
brew install dart ==> Installing dart from dart-lang/dart Error: Your Xcode (10.0) is too outdated. Please update to Xcode 10.2.1 (or delete it). Xcode can be updated from the App Store.
解決方法
打開文件 /usr/local/Homebrew/Library/Homebrew/extend/os/mac/diagnostic.rb
刪除此行代碼check_xcode_minimum_version
app
def fatal_build_from_source_checks %w[ check_xcode_license_approved - check_xcode_minimum_version check_clt_minimum_version check_if_xcode_needs_clt_installed ].freeze end
安裝Dartsdk https://dart.dev/get-dartui
安裝brew https://brew.sh/url
brew tap dart-lang/dart
插件
brew install dart
3d
Vscode 安裝插件[Dart、Code Runner]code