flutter中文网:https://flutterchina.club
flutter官网:https://flutter.dev/docs
fultter下载:可以手动到官网下载sdk
或者git clone -b beta https://github.com/flutter/flutter.git 直接克隆到本地路径
安装过程参考中文网
坑1:如果没有永久将flutter添加到PATH中,使用VS Code 新建flutter project会提示dart路径不对。要想永久将flutter添加到PATH中
![](https://img.haomeiwen.com/i2200841/06bb3badd6b4cf2c.png)
如果报错:The file /.bash_profile does not exist. 说明bash_profile不存在,需要创建一个,bash_profile创建:
1.启动终端Terminal
- cd $HOME
- 创建.bash_profile
输入touch .bash_profile - 编辑.bash_profile文件
输入export PATH={your flutter path}/fultter/bin/:PATH
5.保存并关闭文件
6.更新刚配置的环境变量
终端输入source $HOME/.bash_profile
网友评论