简体   繁体   English

尝试在 https://pub.dartlang.org 上查找包 english_words 时出现套接字错误

[英]Got socket error trying to find package english_words at https://pub.dartlang.org

Trying to add a package using the package get option on Android Studio.尝试使用 Android Studio 上的包获取选项添加包。 I'm getting the following error message:我收到以下错误消息:

" Got socket error trying to find package english_words at https://pub.dartlang.org ." “尝试在https://pub.dartlang.org上查找包 english_words 时出现套接字错误。”

Please how can i resolve this?请问我该如何解决这个问题?

Quoted from Android Studio's doc:引用自 Android Studio 的文档:

Android Studio supports HTTP proxy settings so you can run Android Studio behind a firewall or secure network. Android Studio 支持 HTTP 代理设置,因此您可以在防火墙或安全网络后运行 Android Studio。

You need to fix the Proxy Settings in Android Studio.您需要修复 Android Studio 中的代理设置。 From Android Studio's Documentation Site, I am Sharing the process.从 Android Studio 的文档站点,我正在分享这个过程。

  • From the menu bar, click File > Settings (on a Mac, click Android Studio > Preferences).从菜单栏中,单击文件 > 设置(在 Mac 上,单击 Android Studio > 首选项)。
  • In the left pane, click Appearance & Behavior > System Settings > HTTP Proxy.在左窗格中,单击外观和行为 > 系统设置 > HTTP 代理。 The HTTP Proxy page appears.出现 HTTP 代理页面。
  • Select Auto-detect proxy settings to use an automatic proxy configuration URL for the proxy settings or Manual proxy configuration to enter each of the settings yourself.选择自动检测代理设置以使用代理设置的自动代理配置 URL 或手动代理配置以自己输入每个设置。
    • Click Apply or OK for your changes to take effect.单击应用或确定以使更改生效。

I hope it helps.我希望它有帮助。 Thanks.谢谢。

Like @SouravOni's answer suggests, this is definitely a network issue.就像@SouravOni 的回答所暗示的那样,这绝对是网络问题。 The Dartlang server obviously has issues with restricting certain countries. Dartlang 服务器显然在限制某些国家/地区方面存在问题。

The fastest way to solve this is by connecting via a VPN.解决此问题的最快方法是通过 VPN 连接。 In my case, I use a Kaspersky Antivirus that comes with a VPN , all I had to do was change my location to United Kingdom and then it works就我而言,我使用了一个带有 VPN 的卡巴斯基防病毒软件,我所要做的就是将我的位置更改为英国,然后它就可以工作了

One way to test if this is a connection issue that needs VPN is to visit pub.dartlang.org, if it doesn't go through, then try a VPN测试这是否是需要 VPN 的连接问题的一种方法是访问 pub.dartlang.org,如果它没有通过,则尝试使用 VPN

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 等待另一个 flutter 命令释放启动锁; 尝试在 https://pub.dartlang.org 找到 package english_words 时出现套接字错误 - Waiting for another flutter command to release the startup lock ; Got socket error trying to find package english_words at https://pub.dartlang.org 尝试在 https://pub.dartlang.org 查找 package cupertino_icons 时出现套接字错误 - Got socket error trying to find package cupertino_icons at https://pub.dartlang.org 尝试在 https://pub.dartlang.org 上查找包 ABC 时出现 TLS 错误 - Got TLS error trying to find package ABC at https://pub.dartlang.org 尝试在 https://pub.dartlang.org 上查找包 cupertino_icons 时出现 TLS 错误 - Got TLS error trying to find package cupertino_icons at https://pub.dartlang.org Flutter 调试 /root/.pub-cache/hosted/pub.dartlang.org 包中的编译错误 - Flutter debug compilation error from /root/.pub-cache/hosted/pub.dartlang.org packages 无法解析 URL“https://pub.dartlang.org”。 错误 (69):无法“发布升级”flutter 工具。 五秒后重试...(还剩 9 次尝试) - Could not resolve URL "https://pub.dartlang.org". Error (69): Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left) 无法解析 URL“https://pub.dartlang.org”。错误 (69):无法“发布升级”flutter 工具。 五秒后重试……(还剩 10 次尝试) - Could not resolve URL "https://pub.dartlang.org".Error (69): Unable to 'pub upgrade' flutter tool. Retrying in five seconds… (10 tries left) 我需要在使用Dart包之前将其发布到pub.dartlang.org吗? - Am I required to publish my Dart package to pub.dartlang.org before I use it? 如何估计pub.dartlang.org包的质量? - How to estimate the quality of pub.dartlang.org packages? 将 dart 库转移到 pub.dartlang.org 中的另一个所有者 - Transferring a dart library to another owner in pub.dartlang.org
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM