Renetik
Renetik

Reputation: 6373

"Android Library Update” eclipse task randomly stuck my eclipse on start

It is stuck in cleaning output folder for “Project”. It is not always the same Project. So is there some workaround ?

Upvotes: 9

Views: 5088

Answers (8)

Gino
Gino

Reputation: 1790

In my case, within Eclipse, I had set up a C/C++ Builder to invoke build_native.sh, which is needed to build cocos2d-x. Interestingly, the Android Library Update indicated that it was invoking build_native.sh ! For me this explains why it was taking so long sometimes and seemed to be taking a LONG time to finish. I basically replaced this with an echo command. echo "do nothing" and I think this resolved the hanging issue.

This seems pretty goofy to me -- AFAIK, there's no way to configure 'Android Library Update', and I'm not sure why it's doing what it's doing, since Eclipse has a number of build options which the user can manually control.

Upvotes: 0

CodeShane
CodeShane

Reputation: 6510

Recently experienced this, caused by an Annotation Processor throwing an uncaught exception. Killed Eclipse, removed references to the offending Annotation from one project .java file, and started successfully.

Upvotes: 0

charles young
charles young

Reputation: 2289

Since installing Eclipse 4.2 I have had to resolve this problem twice. The second time I knew that the only thing that worked for me was to create a new workspace and import the projects from the "broken" workspace. It is very fast and is a good opportunity to de-clutter by leaving obsolete projects behind.

Specifically,

  • choose File/Switch Workspace/other and put in the name of your new workspace.
  • Then right click in the Package explorer of the new workspace and choose Import and select Existing Android Code into Workspace.
  • Then browse to the root of a project that you wish to import and also select Copy projects into workspace.
  • Hit Finish.
  • You will have to do the same for any projects that this project is dependent on such as google-play-services.

Upvotes: 0

Ukbin Kwon
Ukbin Kwon

Reputation: 11

In my case the other mentioned methods did not work for me but "Reinstalling Eclipse and its all plugins" related to my project did.

After doing that it came to the normal state.

My env;

Eclipse Juno (under OS X Mountain Lion) GWT ADT SVN

Upvotes: 1

cottonBallPaws
cottonBallPaws

Reputation: 21600

I tried the method of cleaning the project, but the library update happens too fast. I even assigned a custom keyboard shortcut to Clean and I still couldn't get it in there before it started.

I really didn't want to delete the .metadata folder because it is a pain in the arse to lose your workspace settings/preferences/setup.

So I tried:

  1. Make a copy of the .metadata folder
  2. Delete the original
  3. Launch eclipse (it will open with a default/reset workspace), but it will open fine.
  4. Quit eclipse
  5. Delete the new .metadata folder
  6. Make another copy of your original copy and rename it .metadata (basically put the original back)
  7. Eclipse should now launch fine. In my case the Android Library Update still ran but it actually finished within a few seconds instead of hanging.

Then for me the underlying issue was one of my library projects got into a really broken state. I went into the properties for it, unchecked isLibrary in the Android tab and then refreshed the project. Afterwards I turned the library flag back on and did a clean.

I also had a build error in the library code that had to be fixed.

Any how, hopefully that helps if you find yourself in a similar position. Good luck!

Upvotes: 6

Majix
Majix

Reputation: 1792

Deleting the .metadata folder works to get Eclipse back up and running, but after importing Android projects into the workspace the problem came right back for me.

In my case the underlying cause turned out to be the "Android Library Task" being stuck on trying to access the network. I'm connecting to the network via a proxy, and despite being configured in the global OS network settings and all other applications working fine, Eclipse was still unable to access the network. The only thing that worked was, after deleting the .metadata folder to get Eclipse running, manually entering the proxy configuration in "Preferences->General->Network Connections" to match that of the OS network settings.

Now the "Android Library Update" takes a second on startup instead of getting stuck.

Upvotes: 1

Jerry Brady
Jerry Brady

Reputation: 3080

Another trick that works is to kill Eclipse, delete the ".metadata" folder from your workspace and restart Eclipse.

It'll force your workspace back to its initial state and clear up any hung conditions.

Upvotes: 0

Renetik
Renetik

Reputation: 6373

So while I asked this question I found workaround for me , and possibly for others. You have to kill eclipse and on next start , do clean up on all projects before eclipse start that “Android Library Update” task and it will not stuck eclipse.

Upvotes: 4

Related Questions