I had a similar problem - and it popped up quite randomly. Perhaps something was corrupt in the build files, but I ended up fixing it by cleaning the project first then rebuilding.
So in addition to the other responses given:
What sort of things can cause these errors? Something corrupt in the build file.
How do I debug them? Cleaning the project and rebuilding. If it's fixed, this was likely the problem.