Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse keeps Building workspace... and Building workspace... and Building workspace

Why would Eclipse, when building an Android project, get stuck in an infinite loop for Building workspace... and (re) Building workspace... and (re) Building workspace...

Is this a known bug?

What is the proper way to get out of this loop?

Notes:

  1. If I uncheck Project > Build Automatically, it builds fine and even exports a perfectly running signed release APK.
  2. This problem only started after I upgraded to the latest SDK r19. Prior to that (SDK r11) I never experienced this problem.
  3. Bug 160868 describes exactly this problem. But hasn't it being solved since then?
  4. A similar problem description found here but like the previous one, it's old and not directly related to Android development.
  5. Issue 27940 suggests a bug in handling a const named BuildConfig.DEBUG which may or may not be related. But hasn't it been fixed in r18???
  6. I found this great tip for auto tagging / date-stamping in the Android build system, but I am not using anything like that, in addition to double-checking and verifying that builders come at the right order the Project builders list order (same order as other projects that do not exhibit this infinite-loop build behavior).
  7. My hunch tells me there might be a lock-file or flag that somehow got stuck (read-only mode?) and thus confuses the build system. Any idea what that boolean may be and where to find it?
  8. If I first open another project in the same workspace (that doesn't exhibit this problem), the project that has this problem miraculously stops the infinite rebuilding. This doesn't happen if I reverse the order of which project is opened first. Does this imply gremlins in the Eclipse/SDK/ADT build system?

No "blind shooting" please: answer this question only if you have personally experienced this amazing phenomenon (and solved it) or can point to an article that experienced this amazing phenomenon (and solved it).

like image 606
Eternal Learner Avatar asked Jun 17 '12 21:06

Eternal Learner


People also ask

How do I stop Eclipse from building workspace?

In these situations, autobuild can be turned off through Window > Preferences > General > Workspace > Build automatically. Even for smaller workspaces, turning off autobuilding may be a useful feature.

Can I have multiple workspaces in Eclipse?

You can create multiple workspaces in Eclipse. You have to just specify the path of the workspace during Eclipse startup. You can even switch workspaces via File→Switch workspace. File→Import→Existing project in to workspace→select project.

What does building workspace mean in Eclipse?

It means Eclipse is rebuilding every relevant project in your namespace.


1 Answers

Turns out bug 27940 hasn't been fixed yet.

I use the following workaround:

  1. Disable "Project > Build Automatically"
  2. Project > Clean
  3. Project > Build All
like image 123
Eternal Learner Avatar answered Oct 01 '22 12:10

Eternal Learner