报错内容
Exception: Flutter failed to create a directory at "/Users/chaiguangpu/.config/flutter". The flutter tool cannot access the file or directory.
Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user.
判断是文件权限问题
解决过程:
ls -la
chmod 777 .config(该名令执行结果:chmod: Unable to change file mode on .config: Operation not permitted)
sudo chmod 777 .config
再次执行
flutter doctor
解决