12,065,045 members (37,998 online)
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.
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...
Right click your shortcut to Eclipse, and select "Properties".
Add the following to your Target line:
so that it looks something like this:
"C:\Users\griff\Documents\My Software\My Development\Android\Eclipse\eclipse.exe" -vmargs -Djava.net.preferIPv4Stack=true
Now, if you run Eclipse again, updates will work, and so will adding the ADT plug in.
I'm starting to hate Java already - and I haven't got to the point where I've actually seen any code yet...