英文:
OS Error: Connection reset by peer, errno = 104, address = storage.googleapis.com, prort = 37890
问题
当我从pub.dev网站获取Flutter依赖包时,它无法安装,显示如下错误...
而且我的Flutter Doctor如下...
问题的详细描述在这里:
关于依赖项安装的Flutter问题
我该如何解决这个问题?
英文:
When I get Flutter Dependency Packages form pub.dev site then it not to install show below this this error...
And My Flutter Doctor is...
Details Description Issue here:
flutter issue for dependencies installation
How can i solve this problem?
答案1
得分: 6
你正试图连接到https,而服务器是http。
在链接中使用http,并将以下行添加到AndroidManifest.xml
以允许http package
连接到不安全的服务器
<application
android:usesCleartextTraffic="true"
英文:
You are trying to connect to https, while the server is http.
use http 'in the link' and add this line to AndroidManifest.xml
to allow http package
to connect to server that are not secure
<application
android:usesCleartextTraffic="true"
答案2
得分: 3
可能是您的互联网服务提供商阻止了连接。您能访问https://pub.dartlang.org吗?
也许简单的flutter clean
命令可以解决这个问题。如果不行,您还可以尝试flutter pub cache repair
命令。
英文:
It may be your ISP blocking the connection. Can you access to https://pub.dartlang.org ?
Maybe a simple flutter clean
might solve the issue. If not, you can also try flutter pub cache repair
.
答案3
得分: 3
是的,托管Flutter SDK组件的服务器在我的国家(孟加拉国)被封锁。我使用VPN获取美国的IP地址,然后它可以正常工作。
英文:
Yes Servers hosting the Flutter SDK components blocked in my country (Bangladesh). I used vpn for USA IP address then it works.
答案4
得分: 0
因为请求的URL(URI)太长,发生了这种情况。后端直接关闭了连接,并显示消息“连接被对等方重置”。
解决方案:将大数据发送到请求体中(而不是在标头内)。
英文:
In my case it happened, because the request url (uri) was too long. The backend closed the connection directly with the message "Connection reset by peer".
Solution: Send large data within the body field (not inside headers).
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论