1、先下载flutter sdk
下载地址:https://docs.flutter.dev/development/tools/sdk/releases?tab=macos#macos
![](/i/l/?n=22&i=blog/292326/202211/292326-20221119010542579-644532187.png)
将下载的flutter解压到/Users/[用户名]/Sdk
下面
2、安装android studio
下载地址:https://developer.android.google.cn/studio/
下载好DMG包之后安装好Android Studio,然后进行插件安装
![](/i/l/?n=22&i=blog/292326/202211/292326-20221119011001378-1905054666.png)
![](/i/l/?n=22&i=blog/292326/202211/292326-20221119011121072-261035324.png)
选择cancel
![](/i/l/?n=22&i=blog/292326/202211/292326-20221119011400215-963245588.png)
安装flutter插件
![](/i/l/?n=22&i=blog/292326/202211/292326-20221119085007560-1175772939.png)
android studio 安装配置完成
配置flutter环境变量
1、下载的flutter解压到/Users/[用户名]/Sdk
下面
2、终端中打开环境配置文件
vim ~/.bash_profile
输入"i",编辑文件并输入以下内容
export PATH=/Users/jiangys/flutter/bin:$PATH export ANDROID_HOME="/Users/jiangys/Library/Android/sdk" export PATH=${PATH}:${ANDROID_HOME}/tools export PATH=${PATH}:${ANDROID_HOME}/platform-tools export PUB_HOSTED_URL=https://pub.flutter-io.cn export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
说明:PATH=/Users/jiangys/flutter/bin:$PATH ,这里的路径就是下载的flutter解压的路径,千马别放错了哦。
接着按shift+:wq保存并退出vim。
接着输入如下命令:
source ~/.bash_profile
验证一下flutter环境有没有配置成功,输入:
flutter -h
看到如下如的打印信息就是配置成功了
![](/i/l/?n=22&i=blog/292326/202211/292326-20221119102622904-1610875717.png)
标签:Users,flutter,export,https,PATH,图解,安装,Flutter,下载 From: https://www.cnblogs.com/jys509/p/16905585.html