mac 開發環境採坑

homebrew

替換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

Mac下使用國內鏡像安裝Homebrewruby

使用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_versionapp

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

Dart環境搭建

安裝Dartsdk https://dart.dev/get-dartui

安裝brew https://brew.sh/url

brew tap dart-lang/dart插件

brew install dart3d

Vscode 安裝插件[Dart、Code Runner]code

相關文章
相關標籤/搜索