I had the same problem occur when I cleaned my project as well as when it was trying to build. For me, the error was a mismatch between my ant version (1.10) and my default JRE (JDK 1.7). Apparently ant 1.10 is not compatible with JDK 1.7. Changing the default JRE to JRE 1.8.0 fixed the problem.