Monday, November 29, 2010

ADT, Eclipse, and The Mystery of The Frozen Auto-Complete

I like IDEs go, it's my IDE of choice.  For general day-to-day development, it covers so much straight out of the box, but then along come the wide variety of plugins that are available, and all of a sudden, Eclipse helps make life as a software developer just that little bit sweeter.

And when it comes to Android, the Android Development Toolkit (ADT) plugin is about as nice as they come, from quick and simple project setup, through to easy integration with the Android Debug Bridge, the ADT plugin really does deliver in simplifying Android development.  There has been, however, a slight problem that has left me downright frustrated many times, and that is the terrible slowdown in performance when it comes to auto-complete.

How terrible is terrible?  Well try anything from 5 to 20 seconds or so (on my machine) waiting for the auto-complete box to doesn't exactly sound like a lot, but it's more than enough to be extremely annoying, it breaks your flow, and it really makes you want to hurl your mouse at the screen as you realize that there's absolutely nothing that you can do about it but wait and seethe.

From what I've read, this is an issue that only affects Eclipse 3.6, and so the interim solution offered was simply to revert back to 3.5.  The only problem with that solution is that I rather like Helios and the increased stability that comes along with it; I really don't want to have to go back to Galileo if I can avoid it.  And I guess others in the same situation agree, because lo-and-behold...a workaround has been found.

How to Have Your Cake And Eat It
As it turns out, the ADT classpath container is looking for source in the standard Android SDK installation directory...except the standard Android SDK doesn't come with the source.  This means that Eclipse attempts to cache entries that are in a directory that doesn't exist.  Everytime.

And so the obvious workaround is to simply download the source, create the directory, and let Eclipse be happy.  To do this, you simply need to do the following:

And that's it...problem solved!  For the guys on this thread where they provided this solution, I offer my utmost thanks.  As do my mouse and monitor. :)

No comments:

Post a Comment