35

I am trying to install the ADT plugin for Eclipse. However, after I have went to "Install New Software..." and entered the plugin location https://dl-ssl.google.com/android/eclipse/, "Pending..." is displayed. It does not change to "Developer Tools" no matter how long I wait. (I have also tried "http://dl-ssl.google.com/android/eclipse/)

To get around this I tried downloading the current ADT Plugin zip file, but this does not work either. "Developer Tools" appears, but when I click "Next" it does not move past "Calculating requirements and dependencies."

Please provide a solution to the problem of either approach. Thanks.

Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
Gold
  • 351
  • 1
  • 3
  • 3
  • 1
    Does anything show up in Eclipse' log? – Farray Sep 14 '11 at 01:41
  • 1
    I just installed Eclipse(3.7.1 classic),downloaded ADT and installed it to Eclispse this morning. I didn't find any problem. Can you show us the log from Eclipse so we won't guess what happened. – Huang Feb 07 '12 at 05:07
  • @Huang Log and other info [posted on gist](https://gist.github.com/1763812) – Greg Bacon Feb 08 '12 at 01:05
  • @GregBacon I see a `java.net.SocketTimeoutException: Read timed out` error in the log, so I believe this problem is related to the network. Have you tried within another network? – Huang Feb 08 '12 at 02:19
  • @Huang No, this is from a home network connected to residential broadband. Why would Eclipse be able to connect to dl.google.com but not download.eclipse.org? – Greg Bacon Feb 08 '12 at 02:27
  • @Huang Another data point: From Eclipse's internal web browser, I can access the latter site, which redirects to eclipse.org/downloads. – Greg Bacon Feb 08 '12 at 02:33
  • @GregBacon Based on my own experience in installing Eclipse, when downloading or installing plugins online, it's very slow(<10K/s, perhaps because of the bad network here). I have met the 'Read time out` problem but when I tried later, it's OK. I also found a `requires 'org.eclipse.wst.css.core 0.0.0'` error in the gpe-only.log. I have met this for several times, this requires you to install the WPT plugin for eclipse. Really, how about download the latest version as I said in my first comment? My eclipse sometimes bahaves strangely(no responding, shut down automatically) and I can't say why. – Huang Feb 08 '12 at 02:46
  • @Huang I've been having this problem consistently since Saturday or Sunday. I'm running Eclipse Indigo, from `eclipse-java-indigo-SR1-win32-x86_64.zip`. – Greg Bacon Feb 08 '12 at 02:54
  • @Gold, which version of Eclipse are you using? Did you try to install ADT plugin to the last version of Eclipse? – artyom.stv Feb 12 '12 at 01:56

12 Answers12

47

I had the same problem. It started working when I unchecked the box labeled "Contact all update sites during install to find required software".

luff
  • 3,334
  • 1
  • 18
  • 9
12
  1. Goto Preferences->Network Connections and set the correct option (native/direct as per your proxy settings on your network) restart eclipse and try again. [Switching to direct worked for me at home, however in office i had to configure it to native..] (Proxy settings require restart of eclipse IDE on some machines to take effect)
  2. Ensure that your eclipse has all android toolkit dependencies (wst/emf...) installed (http://developer.android.com/resources/faq/troubleshooting.html#installeclipsecomponents)
codejammer
  • 1,636
  • 1
  • 14
  • 27
  • I've tried changing the network preferences. I've tried 1.6 and 1.7_04 JDK. I've tried disabling all but the Indigo update site. I've tried setting `Arrays.useLegacyMergeSort` to `true`. I tried installing from a zip file. I've tried unchecking "Contact all update sites." In spite of all these attempts, none of the eclipse.org sites will proceed past "Pending..." – Greg Bacon Feb 07 '12 at 14:12
  • Have you tried directly unpacking the zip file into your eclipse directory instead of going through the install mechanism? You have to just put features in the features directory and plugins in plugins directory and launch eclipse with -clean – codejammer Feb 08 '12 at 02:36
  • I'll be happy to try anything at this point! How do I fetch the zip files directly? – Greg Bacon Feb 08 '12 at 02:45
  • @GregBacon have you tried the zip from http://dl.google.com/android/ADT-16.0.1.zip yet? – codejammer Feb 10 '12 at 16:03
4

Update

The logged error you provided leads to Install from updatesite hangs under Java 7 and in turn Eclipse Bug 362741 - downloads from update sites hang - (3.7.1 Indigo SR1 windows), see comment 6 specifically (you already applied comment 7).

Please note that while this seems to be a JDK 7 problem at first sight, the linked Java Bug 7077696 - java.net.Socket closes when "PASV" is sent on an authenticated FTP connection classifies the issue as a REGRESSION. Last worked in version 6u26, while you are using 6u30 already. Accordingly, the issue is reported to be fixable by switching to Java 6 elsewhere (implying an earlier version), see e.g. Cannot do any software installs using jdk1.7.0_01 (which uses 6u22):

However, everything works right if I then change the eclipse.ini to change the vm to JDK 1.6:

-vm C:\Java\jdk1.6.0_22\bin\javaw.exe

Oracle's Evaluation concludes, that This does not appear to be a JDK bug, rather it's just the Windows firewall recognizing and blocking the ftp protocol.:

The only difference between JDK7 and older releases is that the JDK is using IPv6 sockets when IPv6 is enabled and so IPv4-mapped IPv6 addresses are used. it may be that Windows or the firewall is not configured to allow IPv6 sockets. [...]

Accordingly, they list a Workaround as well:

Run with -Djava.net.preferIPv4Stack=true

  • add a firewall exception for the Java binary.

  • run with -Djava.net.preferIPv4Stack=true (which disables IPv6 and uses AF_INET sockets exclusively)

  • or disable stateful FTP inspection in the firewall (registry setting or netsh command)

The firewall adjustment seems to be a confirmed workaround as per comment #4 in Socket Exception only in Java 7 (though simply turning it off like there should be handled with care of course).

Good luck!


Presumably you are already aware of Robamaton's answer to Eclipse, Android Plug-in, Install New Software just says “pending” (there are many ADT related questions and strangely it didn't show up immediately in a respective search)? It basically comes down to Codejammer's hint towards Preferences->Network Connections (+1), though with an explanation why it might still fail on your network regardless, see the comments:

Oh, I read that it doesn't respond to general requests from browsers. In any case, network admin confirms it's making a socks connection, but then doing nothing further.

and

Ok, further to previous comment, it's probably trying to connect via. socks 5 - but our network only has socks 4. Admin is going to run the 5 version to see if it then works.

Workaround

Regardless of whether the socks 4 vs. socks 5 proxy settings are actually the problem, a potential workaround might be to install Eclipse and ADT on a different system (ideally on a different network), and copy the resulting folder to yours thereafter (after all, an Eclipse installation is simply a collection of files).

When doing so, please ensure to match 32- vs. 64-bit regarding both the JDK and Eclipse between the source and the target system, because a mismatch would yield other problems (see e.g. my answer to Failed to load the JNI shared library on starting Eclipse).

Community
  • 1
  • 1
Steffen Opel
  • 63,899
  • 11
  • 192
  • 211
  • I'm seeing the problem on a home network connected to residential broadband. In the installer, if I select the URL for Google Plugin for Eclipse, `http://dl.google.com/eclipse/plugin/3.7`, Eclipse *can* fetch those packages, but the install fails because it needs to update an Eclipse package. All of the Eclipse install sites remain stuck in the pending state. – Greg Bacon Feb 07 '12 at 20:13
  • @Greg: Well, that's important information and yields a different picture accordingly - what Eclipse package needs to be updated by the install and fails? Have you tried running the install as an administrator already? Is this a fresh Indigo installation? Which error does the log report (see [Where are Eclipse's log files located?](http://wiki.eclipse.org/IRC_FAQ#Where_are_Eclipse.27s_log_files_located.3F))? – Steffen Opel Feb 07 '12 at 21:03
  • The missing prerequisite is `org.eclipse.wst.css.core 0.0.0`. Yes, I've tried running as an administrator. Yes, this is a fresh Indigo installation. The errors in the log are instances of `SocketTimeoutException` downstream of `FileTransferJob`. – Greg Bacon Feb 08 '12 at 00:46
  • @Greg: I've updated the answer with insights gathered from the logs you provided; given all the details this explanation looks promising, hopefully the workaround applies for you as well! – Steffen Opel Feb 08 '12 at 01:54
  • All the Available Software Sites use the HTTP protocol, not FTP. I added the IPv4 option to `eclipse.ini` and added an exception for `eclipse.exe`, but still no dice. – Greg Bacon Feb 08 '12 at 02:44
  • @Greg: sorry to hear - what protocol is actually used during the various stages of the apparently complex Eclipse update process cannot necessarily be deduced by the URL of the update site alone though, i.e. Eclipse may well switch to to other protocols on the fly (e.g. for the file listing); either way, I've found more hints that the referenced issue might be the problem still (see update), ... [continued] – Steffen Opel Feb 08 '12 at 09:35
  • [continued] ... so given the complex and meanwhile twisted test scenarios, I'd recommend to double check this, ideally by using an earlier JDK (e.g. 1.6.0_22, which [resolved this here](https://bugs.eclipse.org/bugs/show_bug.cgi?format=multiple&id=362744), or temporarily turning off the Windows firewall entirely for testing (which [resolved this here](http://www.java.net/forum/topic/jdk/java-se-snapshots-project-feedback/socket-exception-only-java-7#comment-818414)), if feasible security wise. Other than that I'm running out of ideas here as well, sorry! – Steffen Opel Feb 08 '12 at 09:37
3

What versions of eclipse are you using?

In Helios I was able to install the plugin by going to Help -> Eclipse MarketPlace -> Yoxos MarketPlace (Second Icon at the bottom) and search for ADT and install.

2

I find these google sites very difficult to connect with from certain networks, but not from others. Here in Germany, I had terrible trouble going through Alice, but none going through Deutsche Telekom.

Sometimes I could reach the dl-ssl host from Alice, but in some later operation it would hang then time out. A day or so later, I might be able to make a connection again. Some people say they had luck going through a proxy, or by changing "http" to "https". I also saw this.

Here's what I think is going on.

First, Eclipse is miserably buggy, and handles unexpected situations very badly (for example, catching all exceptions, but failing to provide the exception's message!!), particularly when it comes to unresponsive links. It reminds me of the stock story of the mentally disturbed psychiatrist.

It looks as though the google server is badly configured, possibly as a naive protection mechanism meant to repel denial-of-service attacks: it only handles a few connection requests within a certain time frame from hosts certain networks, and if it gets too many requests, it locks out connections with the host for a long time.

Unfortunately, a single Eclipse update might require many connections in rapid succession; somebody unsure of how to configure Eclipse the first time will likely trip the Google booby-trap.

In my case, I was able to download what I needed by carefully choosing a subset of the available software, being very patient, and if I got locked out, just waiting a day until it let me in again.

Cheers!

2

If you were unable to get network update working, please try downloading the ADT zip package and installing locally as the download page says.

http://developer.android.com/sdk/eclipse-adt.html

michaelliu
  • 1,667
  • 2
  • 13
  • 13
0

Turning off IPv6 worked for me.

nothrow
  • 15,882
  • 9
  • 57
  • 104
0

In my case I use proxy setting, and I follow the instruction of this post. But just one small modification: the SOCKETS setting should be clear and empty as suggested by here

feelfree
  • 11,175
  • 20
  • 96
  • 167
0

I had the same problem and it was driving me nuts. I kept trying for a couple of hours--getting the same error message--and at once it worked! So if I were you I'd just leave it for a bit and come back in a couple of hours and try again. There are several other suggested solutions online that I found, but neither of those seemed to make a difference.

Julian
  • 539
  • 5
  • 7
  • 2
    Welcome to Stack Overflow! Your answer would have been better as a comment to the original question because it gives a hint but not a definitive answer. – Greg Bacon Feb 07 '12 at 03:01
0

I've faced with the same problem before. In my case this was a problem that I was working under the proxy. I think you also work behind a proxy.

I've solved this problem in the following way. Find the SDKManager.exe and run it. In this program find proxy configuration and fill it there. Then from this program try to update your SDK (maybe this will require you to restart this program).

I do not know why but Eclipse proxy configuration is not working in case of Android ADT.

P.S. You have to use JDK 6 (or 5), not JDK 7!!!

Yury
  • 20,618
  • 7
  • 58
  • 86
  • [Installation fails](https://gist.github.com/1763812) on a fresh Indigo installation even with JDK 6. – Greg Bacon Feb 08 '12 at 01:18
  • @Greg, I've also found that you use eclipse x64. As I understood from logs you have x64 computer architecture but winwows is 32 bit. So in this case you have to download JDK 6 32bit and also Eclipse 32bit. Have you tried this? – Yury Feb 08 '12 at 08:16
  • I double-checked, and Control Panel reports that I'm running 64-bit Windows. – Greg Bacon Feb 08 '12 at 13:28
  • You can also try by using "Eclipse Marketplace" . Please follow my answer here: http://stackoverflow.com/questions/11445661/installing-adt-plugin-in-eclipse-for-android/17207218#17207218 – Ripon Al Wasim Jun 20 '13 at 07:13
0

Use Following link to update ADT Pligins.

https://dl-ssl.google.com/android/eclipse/site.xml

Dhruvisha
  • 2,538
  • 1
  • 21
  • 31
0

The only answer I found out when I got this problem was to download the latest 'Eclipse Indigo for Java', updating the ADT and android SDK. After few hours, everything was normal.

0xC0DED00D
  • 19,522
  • 20
  • 117
  • 184