Fetching https://dl-ssl.google.com/android/

本文提供了解决Android SDK更新时遇到的下载失败问题的方法,以及如何通过配置代理服务器解决国内访问Google服务器的困难。同时,介绍了如何进行Android版本更新,包括设置hosts文件、安装和创建Android Virtual Device (AVD) 的步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、 更新sdk,遇到了更新下载失败问题:

Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml 

Fetched Add-ons List successfully 

Fetching URL: https://dl-ssl.google.com/android/repository/repository-8.xml 
Done loading packages. 
Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml 
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: Connection to https://dl-ssl.google.com refused 
Fetched Add-ons List successfully 
Fetching URL: https://dl-ssl.google.com/android/repository/repository-8.xml 
Failed to fetch URL https://dl-ssl.google.com/android/repository/repository-8.xml, reason: HttpHostConnect Connection to https://dl-ssl.google.com refused 
Done loading packages.

解决国内访问Google服务器的困难: 
1).启动 Android SDK Manager ; 
2).打开主界面,依次选择「Tools」、「Options...」,弹出『Android SDK Manager - Settings』窗口; 
3).在『Android SDK Manager - Settings』窗口中,在「HTTP Proxy Server」和「HTTP Proxy Port」输入框内填入mirrors.neusoft.edu.cn和80,并且选中「Force https://... sources to be fetched using http://...」复选框;4.设置完成后单击「Close」按钮关闭『Android SDK Manager - Settings』窗口返回到主界面; 
5).依次选择「Packages」、「Reload」。

二、没有出现Android版本

1、从我的电脑打开C:\Windows\System32\drivers\etc路径下的hosts文件(有txt文本方式打开)

2、将如下代码复制到后面:

#google_android更新 

203.208.46.146 dl.google.com 
203.208.46.146 dl-ssl.google.com127.0.0.1 servserv.generals.ea.com 
74.125.237.1 dl-ssl.google.com 
127.0.0.1 localhost 
203.208.46.146 dl.google.com 
74.125.237.1 dl-ssl.google.com

然后关闭SDK,再从新启动,就会出现Android版本更新了

3、 运行后出现下面的界面,我们选择自己想安装的 Android 版本,我选择了最新版本,然后点击“Install X packages”安装

4、 在新出现的界面上,选择接受并遵守所有许可内容(Accept All),再点击 “Install”。

Android SDK 管理器就开始下载并安装你所选的包了,我们等上一段时间就好了。

5、安装好后,在 Android SDK 管理器界面上你所选的包后面会显示“Installed”,表示已经安装好了。

6、接着我们回到文件夹界面,运行 AVD Manager.exe。

7、打开 AVD Manager.exe后,点击“New"创建新的模拟器:

8、创建一个新的 Android Virtual Device (AVD):输入AVD 名称、选择 Target、输入模拟的 SD Card 的容量大小、以及选择外观皮肤 Skin。然后 “Create AVD”。

9、开始运行你新建的模拟器 Virtual Device:选中这个虚拟设备并点击“Start”,在出现的界面上直接点击“Launch”就可以启动 Android 模拟器了。

基本上就成功了 
root@user:~# sudo apt install -y curl gpg build-essential Reading package lists... Done Building dependency tree... Done Reading state information... Done build-essential is already the newest version (12.9ubuntu3). curl is already the newest version (7.81.0-1ubuntu1.20). gpg is already the newest version (2.2.27-3ubuntu2.3). gpg set to manually installed. The following packages were automatically installed and are no longer required: bridge-utils containerd pigz ubuntu-fan Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 104 not upgraded. root@user:~# gpg --keyserver keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 gpg: key 3804BB82D39DC0E3: "Michal Papis (RVM signing) <mpapis@gmail.com>" not changed gpg: Total number processed: 1 gpg: unchanged: 1 root@user:~# curl -sSL https://get.rvm.io | bash -s stable curl: (6) Could not resolve host: api.github.com curl: (6) Could not resolve host: api.github.com curl: (6) Could not resolve host: api.github.com curl: (6) Could not resolve host: api.github.com WARN: ...the preceeding error with code 6 occurred while fetching https://api.github.com/repos/rvm/rvm/tags Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz curl: (7) Failed to connect to github.com port 443 after 6029 ms: Connection refused Could not download 'https://github.com/rvm/rvm/archive/1.29.12.tar.gz'. curl returned status '7'. Downloading https://bitbucket.org/mpapis/rvm/get/1.29.12.tar.gz Downloading https://bitbucket.org/mpapis/rvm/downloads/1.29.12.tar.gz.asc gpg: Signature made Fri 15 Jan 2021 06:46:26 PM UTC gpg: using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB gpg: Can't check signature: No public key GPG signature verification failed for '/usr/local/rvm/archives/rvm-1.29.12.tgz' - 'https://bitbucket.org/mpapis/rvm/downloads/1.29.12.tar.gz.asc'! Try to install GPG v2 and then fetch the public key: gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB or if it fails: command curl -sSL https://rvm.io/mpapis.asc | gpg --import - command curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - In case of further problems with validation please refer to https://rvm.io/rvm/security root@user:~# source /etc/profile.d/rvm.sh -bash: /etc/profile.d/rvm.sh: No such file or directory root@user:~# echo "source /etc/profile.d/rvm.sh" >> ~/.bashrc root@user:~# source /usr/local/rvm/scripts/rvm -bash: /usr/local/rvm/scripts/rvm: No such file or directory root@user:~# echo "source /usr/local/rvm/scripts/rvm" >> ~/.bashrc root@user:~# rvm install 3.1.0 Command 'rvm' not found, but there are 19 similar ones. root@user:~#
最新发布
07-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值