(1)前言
没错,做开发的这点常识应该知道,java开发由国内maven镜像,android开发有google镜像等等。
Flutter开发,需要联网下载sdk,自然也需要设置代理了,如果没设置则会出现:
Downloading android-arm64 tools…
(This is taking an unexpectedly long time.)^
(2)配置
很显然网络异常,众所周知的原因需要设置代理,或者国内镜像:
Linux:
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
flutter doctor
Windows:
set PUB_HOSTED_URL=https://pub.flutter-io.cn
set FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
D:\Program-Files\flutter\bin\flutter.bat doctor
Make sure you trust this source?不管你信不信任这个镜像,没有镜像就没法下载sdk!就是这么强硬。接受了这个事实,0.4S就给你下载好了。
博客地址:http://blog.yoqi.me/?p=15954
这篇文章还没有评论