1. Prepare flutter sdk download address: https://flutter.dev/docs/development/tools/sdk/releases?tab=macos#macos . Unzip and set environment variables
export PUB_HOSTED_URL=https://pub.flutter-io.cn //国内用户需要设置
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn //国内用户需要设置
export PATH=PATH_TO_FLUTTER_GIT_DIRECTORY/flutter/bin:$PATH
2. Download android studio development tools. Download address: https://developer.android.google.cn/studio/#downloads . download
Mac (64-bit) |
android-studio-2020.3.1.22-mac.dmg |
Unzip and install
3. Install Xcode, if it is already installed, just skip it. Go to the appstore to download and install, use the appid to log in to xcode, and apply for a certificate
4. https://flutterchina.club/setup-macos/ There are tutorials on the Chinese website