Android SDK Manager gives “Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml” error when selecting repository

余生长醉 提交于 2019-12-27 23:42:58

问题


I'm trying to install a platform but when I open Android Manager then I click Available Software then select the https://dl-ssl.google.com/android/repository/repository.xml repository

I get this error:

Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml

I have also tried downloading by clicking on force "http:" for all "https:" downloads on settings panel but it still doesn't help.

I'm working on Windows Vista.


回答1:


If you enter the URL in a browser and then look at the source code of the page you will see that an XML document is returned.

The reason why that URL would work in a browser but not in the android manager might be that you are required to specify a proxy server. In Eclipse (3.5.2) the proxy settings can be found here: "Window" -> "Preferences" -> "General" -> "Network Connections"




回答2:


Try this solution and it worked. this problem is caused because ADB is unable to connect to the android servers to fetch updates. (If at home try turning off firewall)

  • Goto Android SDK Manager c://android-sdk-windows/ open SDK-Manager
  • Click Settings - Will be asked for a proxy.
  • If have one enter the IP address and the port number. If not turn off your firewall.
  • Check "Force https://... " (to force SDK Manager to use http, not https)

This should work immediately.




回答3:


All that was necessary for me, a Ubuntu user, was to change the owner of the ~/.android directory. In a terminal type the following command:

sudo chown -R username:username ~/.android

Obviously, you must replace "username" (twice) with your username.

I wasn't sure if I should post this as an answer because the original poster's question was concerning Windows Vista, not Ubuntu. However I found this post whilst searching for the answer on Ubuntu so I believe it is pertinent. I don't have sufficient reputation to comment on +Maher Gamal's answer, though, which is what lead me to this answer. Hopefully someone else finds it useful!




回答4:


In Mac OS X, the solution is creating the file androidtool.cfg in our user .android folder and then add this line. Sure it is working also for Linux

sdkman.force.http=true

I hope that helps!




回答5:


Open Android SDK Manager and open menu Tools->Options

in Proxy Setting Part Set your proxy and ok




回答6:


Investigating this error on my new Win 7 laptop, I found my ADT plugin to be missing. By adding this I solved the problem: Downloading the ADT Plugin

Use the Update Manager feature of your Eclipse installation to install the latest revision of ADT on your development computer.

Assuming that you have a compatible version of the Eclipse IDE installed, as described in Preparing for Installation, above, follow these steps to download the ADT plugin and install it in your Eclipse environment.

Start Eclipse, then select Help > Install New Software.... Click Add, in the top-right corner. In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the Location: https://dl-ssl.google.com/android/eclipse/ Click OK

Note: If you have trouble acquiring the plugin, try using "http" in the Location URL, instead of "https" (https is preferred for security reasons). In the Available Software dialog, select the checkbox next to Developer Tools and click Next. In the next window, you'll see a list of the tools to be downloaded. Click Next. Read and accept the license agreements, then click Finish.

Note: If you get a security warning saying that the authenticity or validity of the software can't be established, click OK. When the installation completes, restart Eclipse.




回答7:


I am using Kaspersky. I just turned it off and the issue was solved!




回答8:


I got the solution for the Android Studio installation after trying everything that I could find on the Internet. If you're using Android Studio and getting this error:

Find [Path_to_Android_SDK]\sdk\tools\android.bat. In my case, it was in C:\Users\Nathan\AppData\Local\Android\android-studio\sdk\tools\android.bat.

Right-click it, hit Edit, and scroll all the way down to the bottom.

Find where it says: call %java_exe% %REMOTE_DEBUG% ...

Replace that with call %java_exe% -Djava.net.preferIPv4Stack=true %REMOTE_DEBUG% ...

Restart Android Studio/SDK and everything works. This fixed many issues for me, including being unable to fetch XML files or create new projects.




回答9:


I had the same problem: the latest update failed to install because it couldn't rename the tools folder in android-sdk-windows. I'm using AVG antivirus and disabling it didn't help, but I don't think it had anything to do with the AV program anyway.

Fact is, running the Android SDK setup apparently uses items in the "android-sdk-windows\tools" directory. I'm on Win Vista x32 so maybe that causes some unique situation - I'm not sure.

Solution:

  • I made a copy of the tools folder itself (keeping it at the same directory tree level, thus "tools" and "tools-copy" were both in the "android-sdk-windows" folder).

  • I ran Android.bat from that copy

  • I ran the update without problems (it updated the original, not-being-used-at-the-moment tools folder, among whatever other items it needed to).

  • I closed the SDK, deleted the folder (I had to kill the adb.exe process first - not sure why that always persists but you can't delete the folder without doing that).

  • I restarted the SDK from the normal (now-updated) tools folder. Worked like a charm!

Note that simply killing adb.exe was NOT sufficient to get around the original issue... only by copying the tools folder and using the copy to run Android for the duration of the update process was enough to rectify the problem.

I hope this helps others... it's quite vexing to have to spend time resolving basic issues like this just to run an update.




回答10:


If you open /Users/{your name}/android sdks/tools/android (double click it), then click on "Android SDK Manager" menu and then "Preferences" and then you can change your proxy settings specifically for Android SDK Manager. These proxy settings also apply to "Android SDK Manager" if used within Eclipse.




回答11:


After 7 long hours of searching I finally found the way!! None of the above solutions worked, only one of them pointed towards the issue!

If you are on Win7, then your Firewall blocks the SDK Manager from retrieving the addon list. You will have to add "android.bat" and "java.exe" to the trusted files and bingo! everything will start working!!




回答12:


I had the same problem, made all the workarounds you advised: still the same error. I updated Eclipse via "Help / Check for updates" and now everything is ok. This update brought a completely new version of the Android SDK Manager.




回答13:


Also, try to turn off your firewall and try to update with link.




回答14:


I had the same problem. I use Ubuntu 12.04. I tried disabling ipv6.

Modify the /etc/sysctl.conf and add the following:
#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Then restart the machine and check. I think this may be a ipv6 issue even in Windows OS.




回答15:


I had a similar situation where I had the proxy settings already set and the SDK manager wasn't able to modify them permanently. Modifying manually the ~/.android/androidtool.cfg file fixed the issue.




回答16:


Had the same issue on 64 bit win7 machine on company network behind proxy with automatically detected settings.

After a number of trials and failures the following workaround proved to be successful:

  • sharing my phone's wifi internet connection via USB

Best regards, Robert




回答17:


I found another way without setting proxy. I'm currently using an antivirus which has a firewall program. Then, I turn off this firewall and now I can fetch that URL.

If still doesn't work, try to turn off Firewall on your PC, such as Windows Firewall.



来源:https://stackoverflow.com/questions/3808167/android-sdk-manager-gives-failed-to-fetch-url-https-dl-ssl-google-com-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!