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

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.

This question is related to android android-2.2-froyo avd

The answer is


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.


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!!


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


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!


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!


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.


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


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.


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.


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.


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.


Open Android SDK Manager and open menu Tools->Options

in Proxy Setting Part Set your proxy and ok


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.


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.


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


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.


Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to android-2.2-froyo

What does "Failure [INSTALL_FAILED_OLDER_SDK]" mean in Android Studio? Android ADB device offline, can't issue commands Reading RFID with Android phones Android emulator: could not get wglGetExtensionsStringARB error No Activity found to handle Intent : android.intent.action.VIEW How to programmatically set drawableLeft on Android button? Android SDK Manager gives "Failed to fetch URL https://dl-ssl.google.com/android/repository/repository.xml" error when selecting repository

Examples related to avd

PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT (in windows 10) Android Studio AVD - Emulator: Process finished with exit code 1 Why AVD Manager options are not showing in Android Studio Run AVD Emulator without Android Studio Is Google Play Store supported in avd emulators? Error in launching AVD with AMD processor How do you install Google frameworks (Play, Accounts, etc.) on a Genymotion virtual device? Why emulator is very slow in Android Studio? Android Studio doesn't see device Running Google Maps v2 on the Android emulator