Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse hangs at the Android SDK Content Loader

I've been working with Eclipse 4.2 (Juno release 20120920-0800) on OS X 10.8.2 for a few weeks now, building apps for Android 3.0 and above. I have a quad core i7 MacBook Pro with an SSD, so performance is not an issue. Everything was fine.

At some point I imported an Android project that required Android 2.2, so I installed that using the Android SDK manager (v.21). Ever since then, working with Eclipse takes forever. First of all, it will print the following in the status message at the bottom right:

Android SDK Content Loader: (0%)

This takes two minutes or so. The specific message is "Check Projects" and while it's doing that, all Android projects are highlighted in red, because the Android resources aren't found. Then, it proceeds with:

Loading data for Android 2.2 (100%)

This will stay for a couple of minutes. Then it goes on to do the same with Android 3.1 and other SDK versions I have installed. It basically hangs whenever the first autocompletion kicks in (e.g. after typing System.) or when I access the Android preferences before it has loaded.

Here's the state of my Android SDK:

What I've already tried:

  • Reinstalling the Android SDK (via Homebrew), thus deleting /usr/local/Cellar/android-sdk completely.

  • Reinstalling the AVD plugin (v.21) from scratch.

What can I do to find out about the source of these problems and get back to a nice and clean state?

like image 495
slhck Avatar asked Nov 21 '12 08:11

slhck


2 Answers

This is the solution I found which works correctly:

  1. Make sure that eclipse is not active. If it is active kill eclipse from the processes tab of the task manager
  2. Open %USERPROFILE%/ on Windows or simply ~ on Linux/OS X (You can locate this folder from the Desktop)
  3. Go to .android folder (This may be a hidden folder)
  4. Delete the folder cache which is located inside .android folder
  5. Delete the file ddms.cfg which is located inside .android folder
  6. Start Eclipse

Hope that this will work for you.

like image 111
roy mathew Avatar answered Oct 27 '22 05:10

roy mathew


Same problem, stuck at 0%. Ran

/Applications/eclipse/eclipse -clean

and everything worked great again. Modify that path for linux boxes.

Update (from the remark from @Janusz )

For mac users with eclipse outside application directory your clean command will looks similar to:

path/eclipse/Eclipse.app/Contents/MacOS/eclipse -clean 
like image 209
Tim O'Brien Avatar answered Oct 27 '22 05:10

Tim O'Brien