Flutter 配置相关
xxxixxxx

问题一

CocoaPods requires your terminal to be using UTF-8 encoding
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8

解决方案

1
2
3
4
5
6
7
8
9
10
11
1.打开终端 输入命令open -e .bash_profile
2.在终端输入 export LANG=en_US.UTF-8 保存
3.重启VSCode

⚠️⚠️安装zsh导致全局配置还不行的话⚠️⚠️
1. vim ~/.zshrc
2. 按E进入编辑 (大写E)
3. 在最后一行加入 export LANG=en_US.UTF-8
4. 按ESC退出编辑 键入 :wq 保存退出
5. 重启VSCode

问题二

-bash: flutter: command not found

解决方案

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
1.打开终端 输入命令open -e .bash_profile
2.在终端输入

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=${PATH}:/Users/(你的用户名)/flutter/bin:$PATH
export PATH=${PATH}:/Users/(你的用户名)/flutter/bin
export NO_PROXY=localhost,127.0.0.1


3.终端输入 source ~/.bash_profile保存

⚠️⚠️安装zsh导致全局配置还不行的话⚠️⚠️
1. vim ~/.zshrc
2. 按E进入编辑 (大写E)
3. 在最后一行加入
export PATH=/Users/z/flutter/bin:$PATH
export NO_PROXY=localhost,127.0.0.1

4. 按ESC退出编辑 键入 :wq 保存退出


  • Post title:Flutter 配置相关
  • Post author:xxxixxxx
  • Create time:2020-12-03 00:00:00
  • Post link:https://xxxixxx.github.io/2020/12/03/400-Flutter-配置相关/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.
 Comments