- Linux 或 Mac
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
- Windows
PUB_HOSTED_URL ===== https://pub.flutter-io.cn
FLUTTER_STORAGE_BASE_URL ===== https://storage.flutter-io.cn
- 打开flutter的安装目录/bin/cache/
- 删除lockfile文件
- 重启AndroidStudio
添加以下行并更改[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter
为解压后Flutter的路径:
export PATH=PATH_TO_FLUTTER_GIT_DIRECTORY/flutter/bin:$PATH
运行 source $HOME/.bash_profile
刷新当前终端窗口.
Error connecting to the service protocol: HttpException: , uri = http://127.0.0.1:8113/ws