在 macOS 上安装和配置Flutter

1,官方教程
英文:https://flutter.io/setup-macos/
中文:http://doc.flutter-dev.cn/setup-macos/

2,直接download了英文教程里的flutter_macos_v0.5.1-beta.zip(请注意最新版本)

3,解压,把整个Flutter文件夹放去一个你自己喜欢的路径

4,配置环境,参考Flutter安装指南MAC版非常详细

5,配置好之后,终端运行

flutter doctor

其实这段命令意思是检测flutter所要运行的环境是否正常

6,如果有显示如下

WARNING: your installation of Flutter is 51 days old.
To update to the latest version, run “flutter upgrade”.

那就照着提示运行一下

flutter upgrade

7,没有提示或upgrade完之后继续flutter doctor查看,☑️的是已配置好,❗️的是未配置好

8,解决错误提示

  • Android license status unknown.

  • ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.

    • 打开Android studio安装Dart和Flutter两个插件,然后重启AS就ok了

9,配置完毕,赶紧体验一下Flutter吧

    原文作者:温温温888
    原文地址: https://www.jianshu.com/p/696936c4f4e4
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞