Reputation: 2284
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 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.
Upvotes: 37
Views: 30918
Reputation: 23
As of November 2023, to get to HTTP Proxy settings in Android Studio, you do this:
If that doesn't work, you might have to play around with your VPN/proxy settings.
P.S. The next tab down is "Data Sharing" and you can disable Google's collection of usage data there.
Upvotes: 1
Reputation: 808
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.
Upvotes: 1
Reputation: 3488
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
Upvotes: 3
Reputation: 1112
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.
Upvotes: 1
Reputation: 133
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!
Upvotes: 0
Reputation: 264
The following steps may help to fix this issue:
Open configuration
Select Settings
Select HTTP Proxy
Change no proxy to auto-direct proxy settings
Click check connection . check with any Site
done
Upvotes: 16
Reputation: 370
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.
Upvotes: 5
Reputation: 96
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.
Upvotes: 8