export PUB_HOSTED_URL=https://pub.flutter-io.cn
$ export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
$ git clone -b dev https://github.com/flutter/flutter.git
$ export PATH="$PWD/flutter/bin:$PATH"
$ cd ./flutter
$ flutter doctor
-
flutter doctor 有错误的话,按照提示操作就好了, 运行完flutter在终端里面还不能全局使用
-
全局使用方法
打开终端, ls -a 能看到 open .bash_profile
image.png
然后 source PATH
然后在终端使用flutter命令会显示help
image.png
网友评论