Click here to Skip to main content
Click here to Skip to main content

Eclipse Protocol Error when Updating, or Installing ADT

By , 10 Oct 2012
Rate this:
Please Sign up or sign in to vote.

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)

About the Author

OriginalGriff
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?
Follow on   Google+

Comments and Discussions

 
GeneralMy vote of 5 PinmemberPhat (Phillip) H. VU3-Jan-13 18:53 

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

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

| Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 10 Oct 2012
Article Copyright 2012 by OriginalGriff
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid