解决“Connection to https://dl-ssl.google.com refused”问题(转载)

本文解决了在搭建Android开发环境时遇到的连接被拒绝错误。通过修改hosts文件中指定的IP地址和域名映射,成功克服了这一难题。
转载自:http://lushuifa.iteye.com/blog/1676743

android搭建开发环境遇到:Failed to fectch URl https://dl-ssl.google.com/android/repository/addons_list.xml, reason: Connection to https://dl-ssl.google.com refused
这个问题可能是系统问题,需要修改一下host文件:
方法如下:
用notepad打开C:\WINDOWS\system32\drivers\etc中的hosts文件
在最后一行添加74.125.237.1 dl-ssl.google.com
成功解决问题。
A problem occurred configuring project ':better_player_plus'. > Could not resolve all artifacts for configuration 'classpath'. > Could not resolve com.android.tools.build:gradle:8.1.4. Required by: project :better_player_plus > Could not resolve com.android.tools.build:gradle:8.1.4. > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/8.1.4/gradle-8.1.4.pom'. > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/8.1.4/gradle-8.1.4.pom'. > Got socket exception during request. It might be caused by SSL misconfiguration > Connect to 127.0.0.1:10808 [/127.0.0.1] failed: Connection refused: no further information > Could not resolve com.android.tools.build:gradle:8.1.4. > Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.1.4/gradle-8.1.4.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.1.4/gradle-8.1.4.pom'. > Got socket exception during request. It might be caused by SSL misconfiguration > Got socket exception during request. It might be caused by SSL misconfiguration > Connect to 127.0.0.1:10808 [/127.0.0.1] failed: Connection refused: no further information > Could not resolve com.android.tools.build:gradle:8.1.4. > Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.1.4/gradle-8.1.4.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.1.4/gradle-8.1.4.pom'. > Got socket exception during request. It might be caused by SSL misconfiguration > Connect to 127.0.0.1:10808 [/127.0.0.1] failed: Connection refused: no further information > Could not resolve com.android.tools.build:gradle:8.1.4. > Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.1.4/gradle-8.1.4.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.1.4/gradle-8.1.4.pom'. > Got socket exception during request. It might be caused by SSL misconfiguration > Could not resolve com.android.tools.build:gradle:8.1.4. > Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.1.4/gradle-8.1.4.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.1.4/gradle-8.1.4.pom'. > Got socket exception during request. It might be caused by SSL misconfiguration > Connect to 127.0.0.1:10808 [/127.0.0.1] failed: Connection refused: no further information > Failed to notify project evaluation listener. > Could not get resource 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.1.4/gradle-8.1.4.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.1.4/gradle-8.1.4.pom'. > Got socket exception during request. It might be caused by SSL misconfiguration > Connect to 127.0.0.1:10808 [/127.0.0.1] failed: Connection refused: no further information > Failed to notify project evaluation listener. > Could not get unknown property 'android' for project ':better_player_plus' of type org.gradle.api.Project. > Got socket exception during request. It might be caused by SSL misconfiguration > Connect to 127.0.0.1:10808 [/127.0.0.1] failed: Connection refused: no further information > Failed to notify project evaluation listener. > Could not get unknown property 'android' for project ':better_player_plus' of type org.gradle.api.Project. > Could not find method implementation() for arguments [project ':wakelock_plus'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. > Connect to 127.0.0.1:10808 [/127.0.0.1] failed: Connection refused: no further information > Failed to notify project evaluation listener. > Could not get unknown property 'android' for project ':better_player_plus' of type org.gradle.api.Project. > Could not find method implementation() for arguments [project ':wakelock_plus'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. > Could not get unknown property 'android' for project ':better_player_plus' of type org.gradle.api.Project. > Could not find method implementation() for arguments [project ':wakelock_plus'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. > Could not find method implementation() for arguments [project ':wakelock_plus'] on object of type org.gradle.api.internal.artifacts.dsl.d > Could not find method implementation() for arguments [project ':wakelock_plus'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. > Could not find method implementation() for arguments [project ':wakelock_plus'] on object of type org.gradle.api.internal.artifacts.dsl.d > Could not find method implementation() for arguments [project ':wakelock_plus'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. > Could not get unknown property 'android' for project ':better_player_plus' of type org.gradle.api.Project.
08-30
[root@node-a openstack-deps]# cd /tmp [root@node-a tmp]# mkdir -p openstack-offline && cd openstack-offline [root@node-a openstack-offline]# # 下载 packstack(核心工具) [root@node-a openstack-offline]# wget https://dl.fedoraproject.org/pub/archive/rdo/releases/queens/RPMS/noarch/openstack-packstack-13.0.1-1.el7.noarch.rpm et-4.8.2-2.el7.noarch.rpm # 下载 facter(facter-3.9.3 是必须的) wget https://dl.fedoraproject.org/pub/archive/rdo/libreoffice/f/facter-3.9.3-7.el7.x86_64.rpm # 下载 ruby-facter(绑定库) wget https://dl.fedoraproject.org/pub/archive/rdo/libreoffice/r/ruby-facter-3.9.3-7.el7.noarch.rpm # 下载 hiera(配置数据库) wget https://dl.fedoraproject.org/pub/archive/rdo/libreoffice/h/hiera-1.3.4-5.el7.noarch.rpm # leatherman 来自 delorean/common(已验证路径) wget https://archive.org/download/delorean_common_centos7/Delorean-common-centos7-x86_64/leatherman-1.10.0-1.el7.x86_64.rpm wget https://archive.org/download/delorean_common_centos7/Delorean-common-centos7-x86_64/leatherman-client-1.10.0-1.el7.x86_64.rpm --2025-10-02 13:36:23-- https://dl.fedoraproject.org/pub/archive/rdo/releases/queens/RPMS/noarch/openstack-packstack-13.0.1-1.el7.noarch.rpm Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 38.145.32.23, 38.145.32.24, 38.145.32.22 Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|38.145.32.23|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2025-10-02 13:36:25 ERROR 404: Not Found. [root@node-a openstack-offline]# [root@node-a openstack-offline]# # 下载 puppet(必需) [root@node-a openstack-offline]# wget https://dl.fedoraproject.org/pub/archive/rdo/libreoffice/p/puppet-4.8.2-2.el7.noarch.rpm --2025-10-02 13:36:25-- https://dl.fedoraproject.org/pub/archive/rdo/libreoffice/p/puppet-4.8.2-2.el7.noarch.rpm Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 38.145.32.24, 38.145.32.22, 38.145.32.23 Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|38.145.32.24|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2025-10-02 13:36:26 ERROR 404: Not Found. [root@node-a openstack-offline]# [root@node-a openstack-offline]# # 下载 facter(facter-3.9.3 是必须的) [root@node-a openstack-offline]# wget https://dl.fedoraproject.org/pub/archive/rdo/libreoffice/f/facter-3.9.3-7.el7.x86_64.rpm --2025-10-02 13:36:26-- https://dl.fedoraproject.org/pub/archive/rdo/libreoffice/f/facter-3.9.3-7.el7.x86_64.rpm Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 38.145.32.23, 38.145.32.24, 38.145.32.22 Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|38.145.32.23|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2025-10-02 13:36:28 ERROR 404: Not Found. [root@node-a openstack-offline]# [root@node-a openstack-offline]# # 下载 ruby-facter(绑定库) [root@node-a openstack-offline]# wget https://dl.fedoraproject.org/pub/archive/rdo/libreoffice/r/ruby-facter-3.9.3-7.el7.noarch.rpm --2025-10-02 13:36:28-- https://dl.fedoraproject.org/pub/archive/rdo/libreoffice/r/ruby-facter-3.9.3-7.el7.noarch.rpm Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 38.145.32.22, 38.145.32.23, 38.145.32.24 Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|38.145.32.22|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2025-10-02 13:36:29 ERROR 404: Not Found. [root@node-a openstack-offline]# [root@node-a openstack-offline]# # 下载 hiera(配置数据库) [root@node-a openstack-offline]# wget https://dl.fedoraproject.org/pub/archive/rdo/libreoffice/h/hiera-1.3.4-5.el7.noarch.rpm --2025-10-02 13:36:29-- https://dl.fedoraproject.org/pub/archive/rdo/libreoffice/h/hiera-1.3.4-5.el7.noarch.rpm Resolving dl.fedoraproject.org (dl.fedoraproject.org)... 38.145.32.23, 38.145.32.24, 38.145.32.22 Connecting to dl.fedoraproject.org (dl.fedoraproject.org)|38.145.32.23|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2025-10-02 13:36:30 ERROR 404: Not Found. [root@node-a openstack-offline]# [root@node-a openstack-offline]# # leatherman 来自 delorean/common(已验证路径) [root@node-a openstack-offline]# wget https://archive.org/download/delorean_common_centos7/Delorean-common-centos7-x86_64/leatherman-1.10.0-1.el7.x86_64.rpm --2025-10-02 13:36:30-- https://archive.org/download/delorean_common_centos7/Delorean-common-centos7-x86_64/leatherman-1.10.0-1.el7.x86_64.rpm Resolving archive.org (archive.org)... 108.160.163.108, 2a03:2880:f11b:83:face:b00c:0:25de Connecting to archive.org (archive.org)|108.160.163.108|:443... failed: Connection refused. Connecting to archive.org (archive.org)|2a03:2880:f11b:83:face:b00c:0:25de|:443... failed: Network is unreachable. [root@node-a openstack-offline]# wget https://archive.org/download/delorean_common_centos7/Delorean-common-centos7-x86_64/leatherman-client-1.10.0-1.el7.x86_64.rpm --2025-10-02 13:36:52-- https://archive.org/download/delorean_common_centos7/Delorean-common-centos7-x86_64/leatherman-client-1.10.0-1.el7.x86_64.rpm Resolving archive.org (archive.org)... 199.59.149.232, 2a03:2880:f11b:83:face:b00c:0:25de Connecting to archive.org (archive.org)|199.59.149.232|:443... failed: Connection refused. Connecting to archive.org (archive.org)|2a03:2880:f11b:83:face:b00c:0:25de|:443... failed: Network is unreachable. [root@node-a openstack-offline]# ls -lh total 0 [root@node-a openstack-offline]#
最新发布
10-03
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值