bash: flutter: command not found

在终端中执行 flutter run操作时,经常会遇到bash: flutter: command not found的提示,大家可以按照以下步骤进行操作:

//(如果确认之前已安装flutter,此步骤可省略,否则会报一些重复安装/链接的警告)
git clone -b beta https://github.com/flutter/flutter.git   

export PUB_HOSTED_URL=https://pub.flutter-io.cn //(国内用户需设置)

export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn //(国内用户需设置)

export PATH=`pwd`/flutter/bin:$PATH

最后一步:

source ~/.bashrc

然后你就可以尽情的flutter run了

你可能感兴趣的:(bash: flutter: command not found)