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?
- If I uncheck
Project > Build Automatically, it builds fine and even exports a perfectly running signed release APK.
- This problem only started after I upgraded to the latest SDK r19. Prior to that (SDK r11) I never experienced this problem.
- Bug 160868 describes exactly this problem. But hasn't it being solved since then?
- A similar problem description found here but like the previous one, it's old and not directly related to Android development.
- Issue 27940 suggests a bug in handling a const named
BuildConfig.DEBUGwhich may or may not be related. But hasn't it been fixed in r18???
- 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).
- 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?
- 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).
Turns out bug 27940 hasn't been fixed yet.
I use the following workaround:
- Disable "Project > Build Automatically"
- Project > Clean
- Project > Build All