搭建
官网地址:https://flutter.dev
中文官网:https://flutter.cn
- 下载安装Java JDK 并配置环境变量 自行搜索
- 下载安装Android Studio: https://developer.android.google.cn/studio
- 下载解压Flutter Sdk:https://flutter.cn/docs/get-started/install/windows
- Flutter Sdk 的bin目录配置到系统环境变量中 使用flutter -v验证是否成功
- 配置镜像 https://flutter-io.cn/
配置两个环境变量:
Flutter 社区
FLUTTER_STORAGE_BASE_URL: https://storage.flutter-io.cn
PUB_HOSTED_URL: https://pub.flutter-io.cn
清华大学 TUNA 协会
FLUTTER_STORAGE_BASE_URL: https://mirrors.tuna.tsinghua.edu.cn/flutter
PUB_HOSTED_URL: https://mirrors.tuna.tsinghua.edu.cn/dart-pub
使用 flutter doctor 检测镜像是否配置成功
报错解决
cmdline-tools component is missing

1.png

2.png

3.png
cmd 窗口运行 flutter doctor --android-licenses

4.png
Visual Studio not installed; this is necessary for Windows development.
这个错误暂时先不解决
-
Android Studio 安装Flutter 插件
5.png
6.png


