美文网首页
bash: flutter: command not found

bash: flutter: command not found

作者: 玺睿siri | 来源:发表于2019-03-13 11:32 被阅读1次

    在终端中执行 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

          本文链接:https://www.haomeiwen.com/subject/pkjzpqtx.html