Flutter中文文档: https://flutter-io.cn/docs
Flutter 配置: https://flutter.dev/community/china
1.JDK
2.Flutter SDK
下载地址: https://flutter.dev/docs/development/tools/sdk/releases (由于某些原因下载不了)
Git : 使用Git for windows 的 git-bash 输入以下命令来获取flutter sdk
git clone -b beta https://github.com/flutter/flutter.git
默认下载位置: ../Git/flutter
3.配置环境变量
1) 如果您在中国安装或使用Flutter,使用托管Flutter依赖关系的可靠本地镜像站点可能会有帮助。在运行该flutter命令之前,要指示Flutter工具使用备用存储位置,您需要设置两个环境变量,PUB_HOSTED_URL 和 FLUTTER_STORAGE_BASE_URL。
PUB_HOSTED_URL : https://pub.flutter-io.cn
FLUTTER_STORAGE_BASE_URL: https://storage.flutter-io.cn
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
git clone -b dev https://github.com/flutter/flutter.git
export PATH="$PWD/flutter/bin:$PATH"
cd ./flutter
flutter doctor
2) 配置Git的环境变量
3) 将 flutter 的bin目录 (如: D:\Flutter\flutter\bin ) 配置到系统环境变量
4) 打开系统的“cmd” ,输入 flutter doctor ; ( 注意:flutter 开发语言是Dart,所以在这里他会去监测你是否有dart sdk,如果没有他会自动帮你安装,并且捆绑在flutter文件夹里面。)
4.Flutter导入Android Studio:
在Android Studio 搜索Flutter设置Flutter SDK Path