关于flutter环境搭建踩坑记录附解决方法
注:本贴适用于android开发安装flutter,适用开发工具android studio
1.flutter官网下载sdk 版本最好不要太高我这里下载的是3.3.0
https://docs.flutter.dev/get-started/install
2.安装好sdk后配置环境变量,配置完毕重启一下电脑
用户变量:
FLUTTER_STORAGE_BASE_URL :https://storage.flutter-io.cn
PUB_HOSTED_URL :https://pub.flutter-io.cn
系统变量:
FLUTTER_HOME :C:\Users\Administrator\flutter //flutter的安装位置
ANDROID_HOME:C:\Users\Administrator\AppData\Local\Android\Sdk //android sdk 安装位置
CLASSPATH:.;%JAVA_HOME%\bin;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar
JAVA_HOME:C:\Program Files (x86)\Java\jdk-11.0.2 //java jdk安装位置
path变量里加入:%FLUTTER_HOME%\bin
%FLUTTER_HOME%\bin\cache\dart-sdk