To add billni to your answer, you may have an incorrectly defined Ant class path.
Find the wrong path in window> Settings> Ant> Runtime> Records
I have 3 types of entries:
Ant Home Records
Global records
Entered Entries
In my situation, the bad way was to> Global Entries
To fix this, delete the wrong path by choosing> Delete
Add a new and correct path using> Add JARs ... or> Add External JARs ...
Assuming your path is correct and that there are no other errors, your build should now work!
source share