Installing the ADT Plugin for Eclipse

前端 未结 12 2112
故里飘歌
故里飘歌 2021-02-05 01:38

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/ec

12条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-05 02:00

    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).

提交回复
热议问题