Click here to Skip to main content
15,867,453 members
Articles / General Programming / Exceptions
Tip/Trick

Eclipse Protocol Error when Updating, or Installing ADT

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
10 Oct 2012CPOL1 min read 17.4K   2   1
If you are trying to follow the instructions on how to get your system up and running with Eclipse, you may get an error when installing ADT

Introduction

Installing Eclipse to get Java working on Android is a lot more complicated than it (probably) should be. One of the problems I encountered was that when I tried to install the ADT plugin for Eclipse, no matter what I tried, it would fail with an exception:

* Unable to read repository at [HTTP URL] 
download.eclipse.org/tools/cdt/releases/indigo./content.xml.
* Address family not supported by protocol family: connect
* Unable to read repository at [HTTP URL] download.eclipse.org/eclipse/updates/3.7/content.xml.

Background

If you Google for this, you will find it is a common problem, but none of the solutions I found would work for me, so I considered trying an update of Eclipse (brand new, just installed direct from the website) in case they had a fix.

And lo! I got the same error, but a bit more obvious: just

Address family not supported by protocol family: connect

Address Family? Connect? This couldn't be my ISP using (or not using) an IPV6 address, could it?

So, a quick Google later, and a bit of fiddling and faffing, and it works perfectly. Hopefully, this will save you some time as well...

Fixing the Problem

Close Eclipse.

Right click your shortcut to Eclipse, and select "Properties".

Add the following to your Target line:

-vmargs -Djava.net.preferIPv4Stack=true 

so that it looks something like this:

"C:\Users\griff\Documents\My Software\My Development\Android\Eclipse\eclipse.exe" 
-vmargs -Djava.net.preferIPv4Stack=true 

Press OK.

Now, if you run Eclipse again, updates will work, and so will adding the ADT plug in.

Points of Interest

I'm starting to hate Java already - and I haven't got to the point where I've actually seen any code yet...

History

  • Original version

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
CEO
Wales Wales
Born at an early age, he grew older. At the same time, his hair grew longer, and was tied up behind his head.
Has problems spelling the word "the".
Invented the portable cat-flap.
Currently, has not died yet. Or has he?

Comments and Discussions

 
GeneralMy vote of 5 Pin
WebMaster3-Jan-13 18:53
WebMaster3-Jan-13 18:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.