在終端中執(zhí)行 flutter run操作時,經(jīng)常會遇到bash: flutter: command not found的提示,大家可以按照以下步驟進(jìn)行操作:
//(如果確認(rèn)之前已安裝flutter,此步驟可省略珠漂,否則會報(bào)一些重復(fù)安裝/鏈接的警告)
git clone -b beta https://github.com/flutter/flutter.git
export PUB_HOSTED_URL=https://pub.flutter-io.cn //(國內(nèi)用戶需設(shè)置)
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn //(國內(nèi)用戶需設(shè)置)
export PATH=`pwd`/flutter/bin:$PATH
最后一步:
source ~/.bashrc
然后你就可以盡情的flutter run了