我已經安裝了Apache Ant並正確設置了Path,CLASS_PATH和ANT_PATH變量。當我在那裏的build.xml文件是我的項目文件夾中運行一個命令行罐子任務,我得到以下錯誤:執行Ant任務時出現問題
BUILD FAILED
C:\Documents and Settings\TonyS\My Documents\My Workspace\code\build.xml: 32:
The following error occurred while executing this line:
jar:file:/C:/Documents%20and%20Settings/TonyS/My%20Documents/Ant/apache-ant-1.8.1/lib/ant.jar!org/apache/tools/ant/antlib.xml:37: Could not create task or type: componentdef.
Ant could not find the task or a class this task relies upon.
....
可以請別人給我的幫助,因爲這是推動我瘋了...
謝謝!
Componentdef.class和Jar.class在ant.jar本身中。你的ant.jar是否損壞 - 大小是1.4Mb左右? – JoseK 2010-10-12 08:14:56
我假設你談論的是PATH(不是'Path'),'CLASSPATH'(而不是'CLASS_PATH')和'ANT_HOME'(而不是'ANT_PATH')*環境變量*? – zb226 2017-04-11 11:52:53
我不記得了,那已經快7年了。 – Anto 2017-04-11 12:43:40