可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
This is the same problem as a number of other have reported, e.g.
Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: Connection to https://dl-ssl.google.com refused
Android SDK Not Updating Packages
Android SDK Manager gives "Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml" error when selecting repository
But all of the suggested solutions either aren't relevant or haven't worked.
My problem is I get a connection refused error whenever I attempt to update the Android SDK Manager. This is the SDK Manager's log output:
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-7.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
Entering https://dl-ssl.google.com/android/repository/addons_list-2.xml into Firefox just times out - I don't get an XML document.
I've tried it with and without the force http:// option with no luck. This is from home, I'm not using any kind of proxy server and I don't have a firewall set up.
Something else I tried (in order to eliminate my machine as the source of the problem) is entering https://dl-ssl.google.com in a web browser on another computer that uses the same internet connection (Acer laptop w/ Win7 64-bit). The connection times out on the other computer as well, which almost leads me to think my IP is blacklisted on the server somehow (I have no idea how that would have happened) or it's an ISP issue.
So my question is how can I get SDK Manager to update? If my IP is in fact being blocked by Google's server for some reason, is there anything I can do to get around it? E.g. by routing through some kind of proxy? Are there any mirrors for dl-ssl.google.com?
Environment info: I'm using ADT Rev 21.1 on Kubuntu 12.04.2 LTS.
回答1:
In Android SDK Manager select
Tools -> Options
then check the box "Force https://... sources to be fetched using http://..."
回答2:
On linux, I got it working executing the Android SDK Manager with sudo(in your android-sdk-linux/tools folder)
sudo ./android
回答3:
i got the same problem today, and i think is because the china GFW block me. bad ass..
ok,try this,sdk manager -> tools
them use proxy, i tried ,
proxy server: www.google.com.hk (i am in china,try www.google.com if other country)。
proxy port : 80
and choose Force https://.... sources bala bala
then click packages -> reload,the problem is gone.
i find this when i google this issue.
回答4:
there might be several problems if you are in an organization maybe you got blocked bacause of firewall settings but and indorder to fix it go to your android SDK manager> tools> options>
and you will see the following page
in here set the configurations for a proxy server that SDK manager can use to fetch the dependencies.
but also it might be a problem at a lower level i mean u might be cut off from a accessing google services due to sanctions or sth, in that case you have to download the following stuff manually and past it i your android sdk root:
platform-tools and the platforms (android APIs) directories after that you have the following folders in your sdk location.
回答5:
if you are using proxy server
Open Eclipse
Window ->Android SDK Manager ->tools-> Option
Input your proxy server and port.
you will find your proxy server and port if open internet explorer->internet option->connections->lan settings
回答6:
I solved this issue by adding ipaddres of my server in to Http:Proxy server
and port number 80
And Sdk got updated withing fraction of second.
To get ip address of your proxy server
Go to internet options
Under connection tab > lan settings > check if Use automatic configuration script is checked>
if its checked copy only ip address from address textbox and past it in Http:proxy server text box in sdk manager tools option :) .
good luck
Happy coading
回答7:
I have faced the same problem in Windows. Then it worked for me after doing the following steps:
Open cmd as administrator
ping dl-ssl.google.com
Go to the SDk manager and retry the installation
(Note: Make sure to have the default options in SDK manager. Dont check Force https.... option before following the above steps)
回答8:
This is most likely because you are connected to the Internet via a proxy server.
Restart SDK manager and try again.
回答9:
This is a Proxy issue. Try using your Browser proxy settings to SDK MANAGER>>Tools >> Option Settings page. It will work 100%.
回答10:
I have solved this by:
- Giving full permissions to the sdk dir (Right Click->Properies->Security->Edit)
- Checking the "Force https to http" and clicking on "Clear Cache" in the "Options" dialog window
回答11:
I had same issue (with exactly same error messages),
Running tools/android.bat as Administrator resolved my problem ...
回答12:
The reason sudo works on linux and Mac OS X is that sometimes the permisions in ~/.android get misconfigured. If you are having this problem over and over again, and you would rather not type sudo every time you want to update your sdk, go to ~/.android and ensure that your account owns and has permissions to read and write all the files.
In my case I found that root owned several folders including the cache directory,
cd ~/.android
sudo chown -R <yourusername> *
fixed the problem for me. If you are touchy about the security of your system, you can also specify a group like:
sudo chown -R <yourusername>:<yourgroup> *
AND
you could also specify the individual files and directories that need to be changed if you don't like the wild card.
sudo chown --R <yourusername> cache
for instance.
Thanks to the folks here for figuring it out.
回答13:
New and real Solution!
Tested On windows 10.
1- Download and run psiphon or freegate and connect it (turn on)
2- after, Search "Internet Properties" or "Internet Option"in start
Internet Option Icon
3- then Open it and go to Connections tab then LAN setting
and click on Advance
4- Now you can see the proxy address and port that psiphon or freegate uses it
and Now copy those and past to SDK manager proxy Setting
5- then clear cashe and check all check boxes except "ask before restarting ADB"
6- now close the setting window and reload packages.
congratulations, Now you have access to the all latest version of packages
Notices!
1- do all steps, Step by step
2- connect psiphon or freegate before every thing and don't disconnect them untill you download packages you want!
3- if you disconnect psiphon every time, you must do all steps again.
Good luck
回答14:
Use the ControlPanel applet in the java bin directory, (/usr/lib/jvm/jdk1.7.0/bin/ControlPanel) (change for your java version).
In the Java Control Panel [General] TAB, Select the [Network Settings] button, Change the proxy settings from [Use browser settings] to [Direct connection]. (There are proxy settings in the Browser, Eclipse and the SDK which are all blank and only this java setting worked).
Next in Android SDK tools dir, open the android shell script and towards the end of the file, find the line with:
exec "$java_cmd" \
and below this, insert the line
-Djava.net.preferIPv4Stack=true \
I have found that these 2 steps has fixed this for me using both ubuntu 12.04 64bit, java 1.7.0_21-b11 and ubuntu 12.04 32 bit, java 1.6.0_45.
回答15:
The solution for me was just to keep retrying. The easiest way I found was to periodically hit refresh in my browser and once XML was returned, switch to Eclipse -> SDK Manager. For whatever reason it appears my IP address block is being severely throttled by https://dl-ssl.google.com. Hopefully a Google engineer can check out this server's configuration (denyhosts settings??) as it seems to be an ongoing problem with a number of topics in Google groups
回答16:
Clearing the cache worked for me.
On the OS X version: Preferences... > Clear Cache
回答17:
The solution for me on my Mac was to temporarily disable/turn off Little Snitch. The Snitch was blocking my access to dl-ssl.google.com and I didn't know it because I had the Snitch set to 'silent' mode, and therefore I was unaware it was blocking the SDK Manager.
回答18:
If see connection error on a headless server,
./android update sdk -u -s
回答19:
And one more...the only thing working for me here on Windows 10 inside vmWare:
- Right click "This Computer"
- "Properties"
- "Extended system properties"
- "Environment Variables"
- Add a new key "ANDROID_SDK_HOME" and point it to "c:\users[username].android"
回答20:
I had the same issue - then i noticed you can revert to http as well. THis is easier trying to figure out the firewall configuration.
screenshot
回答21:
In my case, on Linux, the problem was that something had previously created the ~/.android directory with root
ownership. So eclipse couldn't write to this directory. Once discovered, this was simply resolved with:
sudo chown -R $USER:$USER ~/.android
回答22:
Sometimes this problem is created by the antivirus program installed in your system. Set the antivirus to "Disable until the computer is restarted" option. In my case, I had installed Avast antivirus. I disabled it by: right click avast in notification area >> Avast shields control >> Disable until computer is restarted.
回答23:
Go to tools-> options and then give the details of your proxy server and port.
Then click on packages->reload