如何用Flutter解决代理设置问题?

时间:2019-07-11 08:02:03

标签: android flutter proxy cross-platform flutter-dependencies

我是新手。我们在网络中有一个代理设置。该代理已经应用于Android Studio,并且工作正常。在创建新应用程序时,它运行良好。但是,获取包不起作用。它返回

Could not resolve URL "https://pub.dartlang.org".

pub get failed (69) -- attempting retry 1 in 1 second...'

set https_proxy=USERNAME:PASSWORD@hostname:port' I tried this code. Even though it is not working

获取软件包不起作用

1 个答案:

答案 0 :(得分:0)

您需要在Flutter文件夹和项目文件夹上同时运行这两行:

set https_proxy=USERNAME:PASSWORD@hostname:port
set http_proxy=USERNAME:PASSWORD@hostname:port