国内flutter环境部署(记录篇)

设置系统环境变量

bash 复制代码
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

使用以下命令下载flutter镜像

bash 复制代码
git clone -b stable https://mirror.ghproxy.com/https://github.com/<github仓库地址>

#例如flutter仓库
git clone -b stable https://mirror.ghproxy.com/https://github.com/flutter/flutter.git

添加PATH到环境

其中/path/to/your为你的flutter安装根目录

bash 复制代码
export PATH="$PATH:/path/to/your/flutter/bin"

运行flutter doctor检测是否安装完成

bash 复制代码
flutter doctor
相关推荐
QuantumLeap丶1 小时前
《Flutter全栈开发实战指南:从零到高级》- 12 -状态管理Bloc
android·flutter·ios
前端好多云1 小时前
从一个带并发数限制的请求深入 Dart 的 Future
flutter·dart
星释10 小时前
鸿蒙Flutter三方库适配指南:09.版本升级适配
flutter·华为·harmonyos
bing.shao14 小时前
Flutter 与 Native的比较
flutter
旧时光_19 小时前
第2章:第一个Flutter应用 —— 2.4 路由管理
flutter
旧时光_1 天前
第2章:第一个Flutter应用 —— 2.2 Widget简介
flutter
Bryce李小白1 天前
Flutter provide框架内部实现原理刨析
flutter
CN-cheng1 天前
Flutter项目在HarmonyOS(鸿蒙)运行报错问题总结
flutter·华为·harmonyos·flutter运行到鸿蒙
Larry_zhang双栖1 天前
Flutter Android Kotlin 插件编译错误完整解决方案
android·flutter·kotlin