This post is all about this error and on how to resolve this error. Just to give some background: Apache Ant is a Java-based build tool. For more information on Apache Ant, you can visit Apache Ant . The recent version is Apache Ant is Ant 1.71 and can be downloaded from here. We can add a else attribute in the conditionTask for making a choice. Coming back to the error that you have encountered: Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the "else" attribute. This can happen if you have Apache ant with a version less than 1.65 So, Make sure to update your ant to a version more than 1.65. Recent version, as I mentioned is, 1.71. Does this fix the problem that you encountered with ant? If yes, Great. No, then continue reading. We have other fix available for Class org.apache.tools.ant.taskdefs.ConditionTask doesn't support the "else" attribute. If you get this error even though you have the ant 1.65 or more, then the following informat