3

Android Studio Setup Wizard (studio64.exe) is not able to fetch some XMLs.

I have set in studio64.exe.vmoptions

-Djava.net.preferIPv4Stack=true
-Dhttp.proxyHost=... 
-Dhttp.proxyPort=...

Also tried

-Dhttp.proxyHost=www.google.com 
-Dhttp.proxyPort=80

But nothing works and I didn't find anything helpful on google seeming like I'm the only one with that problem.

Details:

Android SDK was installed to C:\Users\*\AppData\Local\Android\sdk
Refresh Sources:
  Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: Connection refused: connect
  Fetched Add-ons List successfully
  Refresh Sources
  Failed to fetch URL http://dl-ssl.google.com/android/repository/repository-10.xml, reason: Connect Connection refused: connect
Refresh Sources:
  Failed to fetch URL http://dl-ssl.google.com/android/repository/repository-10.xml, reason: Connect Connection refused: connect
There is nothing to install or update.
The following SDK component was not installed: build-tools-21.1.1

I'm using a lot of dev tools without a problem and Android Studio is now the first one with connectivity issues.

The XML files mentioned I can access via browser without a problem.

syr
  • 836
  • 1
  • 12
  • 28
  • are you behind a proxy server ? if so you have configure your proxy in Android Studio at Settings > HTTP Proxy . – Piyush Agarwal Jan 19 '15 at 12:44
  • Yes I'm behind a proxy which I set in studio64.exe.vmoptions. I'm stuck in the Android Studio Setup Wizard and didn't want to skip the initial setup. If there's no alternative I likely will do so.. – syr Jan 19 '15 at 13:46
  • OK the solution was very easy...aborting setup, tick to rerun the setup, configure (set proxy) and restart Android Studio (Setup Wizard) which then downloaded all stuff properly. At least settings in studio64.exe.vmoptions are obviously not checked/used during initial setup. – syr Jan 19 '15 at 13:56

2 Answers2

5

I had a similar issue when working behind a proxy server on x86 system. Initially the Studio doesn't provide any interface for settings so the following has to be done.

Proxy settings for Android Studio should be made in "other.xml" which resides in "D:\Users\%UserProfile%.AndroidStudio\config\options" (in my system).

To manually set a proxy find "USE_HTTP_PROXY" and make it's value = "true" followed by proper "PROXY_HOST" and "PROXY_PORT" values.

To automatically detect the present proxy settings find "USE_PROXY_PAC" and make it's value = "true".

  • 1
    Hi all, I can't mark this reply as the right answer as I am not the one who asked this question. **But I want to confirm that this is the solution to me**. Just follow the steps by @Aakash, the Android Studio will be able to connect to the proxy server and complete the necessary download and installation. – Lawrence Teo Jan 30 '15 at 09:32
0

If you are on Windows, try running Android Studio as Administrator. It solved the problem for me. I am using Android Studio 1.5.1.

EDIT: The problem came up again and this time, it was solved by setting the HTTPS Proxy as well in addition to HTTP Proxy. More details here.

Community
  • 1
  • 1
div
  • 1,475
  • 3
  • 22
  • 32