flutter安装运行
2019-06-17 本文已影响0人
大写的空气
官网下载flutter sdk
https://flutter.dev/docs/development/tools/sdk/releases?tab=macos#macos
添加flutter到path中
临时添加:打开终端工具,执行export PATH=~/Documents/锋/flutter/bin:$PATH; ~/Documents/锋/flutter/bin为flutter下载完毕后,本地路径。
永久添加到path
终端进入home路径 cd ~/ 创建.bash_profile 如已经创建,直接打开 open .bash_profile
在打开工具中增加下面内容
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=~/Documents/锋/flutter/bin:$PATH
此时,在终端直接输入flutter命令将不会出现 flutter:command not found.
执行flutter doctor,检查是否需要安装其他依赖