37

Just got the new Android Studio but it won't connect for updates. When I go to Help>Check for Updates... I get a pop-up sayin:

Connection failed. Please check your network connection and try again.

  • I tried changing my network settings around (Static/DHCP).
  • I tried "Auto-Detect Proxy settings".
  • I tried Adding "studio.exe" to my inbound/outbound rules of windows firewall, I also have "Java(TM) Platform SE binary" added (The VM running Idea).
  • I tried looking around my hosts file to see if I messed something up in there.

I run normal IDEA and my updates connect, but obviously tells me there is no new updates. Has anyone else run into this problem or found a solution to this? My colleagues at work here did not have this problem at all, only the "JAVA_HOME" issue on one of my colleagues' machines.

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Natie
  • 2,284
  • 3
  • 19
  • 20
  • 4
    Seems to be a general problem. Either the server are offline or there is a real bug for the update feature which prevents it... – WarrenFaith May 16 '13 at 10:17
  • 1
    The same problem for me...I've also tried to switch off my firewall...I think there's some problems with the Google's Servers. – Rino May 16 '13 at 10:14
  • 6
    I have checked the base IDE's FAQs and found an answer that helped me out: edit the files with .vmoption in Program Files (x86)\Android\android-studio\bin and add the following option: -Djava.net.preferIPv4Stack=true or if you prefer IPv6: -Djava.net.preferIPv6Addresses=true . It works for me. Source: http://intellij-support.jetbrains.com/entries/23403071-Network-connectivity-issues-when-running-under-Java-1-7 – Marton Rusko May 18 '13 at 18:28
  • May or may not be related http://developer.android.com/sdk/installing/studio.html .is timing out also – Rob Kielty May 21 '13 at 21:40
  • be glad! mine just updated to 0.1.1 and now it can't talk to gradle! it's passing the wrong number of arguments to the gradle api. – gcb May 30 '13 at 02:09

8 Answers8

16

The following steps may help to fix this issue:

  1. Open configuration

  2. Select Settings

  3. Select HTTP Proxy

  4. Change no proxy to auto-direct proxy settings

  5. Click check connection . check with any Site

done

8

Looks like it is a bug in Android Studio. Others are having the same problem, check out here and here. It's worth remembering that v0.1 is an Early Access Preview as described on the official Android web site.

5

I have checked the base IDE's FAQs and found an answer that helped me out: edit the file ending with .vmoption in Program Files (x86)\Android\android-studio\bin and add the following option:

-Djava.net.preferIPv4Stack=true

or if you prefer IPv6:

-Djava.net.preferIPv6Addresses=true

It works for me.

Source: http://intellij-support.jetbrains.com/entries/23403071-Network-connectivity-issues-when-running-under-Java-1-7

Gerstmann
  • 5,368
  • 6
  • 37
  • 57
Marton Rusko
  • 370
  • 2
  • 8
3

None of these answers helped me nor did trying to manually add the downloads certs to my java and jdk keystores. If you are in the same spot as me, try editing your vmoptions files to include the paths.

On Windows you need to open an editor with admin privs and you can find the files here:

Program Files (x86)\Android\android-studio\bin

Add these two lines to whichever version of AS you use or both to be sure.

-Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml
-Didea.patches.url=http://dl.google.com/android/studio/patches/

I discovered this via a note from a Google dev: https://code.google.com/p/android/issues/detail?id=74610&q=android%20studio%20connection%20failed&sort=-stars&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

ian.shaun.thomas
  • 3,468
  • 25
  • 40
1

I am not sure if our problems are identical, but when I had trouble updating Android Studio I ran it as administrator and then tried to update and it worked. I solved a similar problem on Eclipse in the same manner.

brainmurphy1
  • 1,082
  • 1
  • 19
  • 24
1

I updated my Android Studio to 1.5.1 and met the same problem. I'm using ShadowSocks and I guess it caused this issue. I changed HTTP Proxy setting from no proxy to auto detect and it was solved. You can click "Check connection" and enter any URL to test whether auto proxy detection works.

Weifeng
  • 709
  • 1
  • 6
  • 18
0

I can update it using the astrill VPN. its website.

bbsimon
  • 237
  • 2
  • 2
0

Step 1 is vague. Please indicate where this "Open Configuration" step occurs. Is this the Internet Properties for the computer, or some dialog buried deep within the bowels of Android Studio? I have searched and cannot find anything called "Configuration" or "Open Configuration" within Android Studio. Possible candidates might be (from the available / non-grayed out menu items):

File -> Settings
File -> Other Settings -> Default Settings...
File -> Other Settings -> Configure plugins...
Run -> Edit Configurations...
Help -> Configure Debug Log Settings

However none of these choices offer up anything that allows you to follow the indicated next steps.

I am on Windows 7, running Android Studio (Preview) 0.5.2 and the only reason I'm trying to use AS is because of the stupid logcat scroll problem in Eclipse (another crappy editor).

If someone could recommend a solution to the AS update / connection issue (yes, I checked, the other solutions on here don't work either), Eclipse non-locking scroll lock (yes, I checked, the solutions on here don't work), or an actual functioning Android plugin for NetBeans, I'd be extremely grateful. Thanks!

Patrick Q
  • 133
  • 2
  • 12
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment). – Felipe Miosso May 08 '14 at 16:19
  • 1
    @FelipeMiosso, I tried to comment, but I couldn't because I don't have enough reputation. neubert, I could have made my own post, but it's not a NEW Question, and everyone screams about duplicate questions on here and "DID YOU EVEN SEARCH BEFORE POSTING?" Doesn't matter anymore anyway. I gave up on Android Studio. It's a piece of crap. Even Eclipse is better. – Patrick Q May 16 '14 at 17:58