eclips ant 运行错误 foreach Cause: The name is undefined.

在国外的网站看到的解决办法,分享给大家!!!
BUILD FAILED
D:\__workspace_svn\apps\build.xml:18: The following error occurred while executing this line:
D:\__workspace_svn\apps\apps_build.xml:145: The following error occurred while executing this line:
D:\__workspace_svn\apps\apps_build.xml:100: The following error occurred while executing this line:
D:\__workspace_svn\apps\apps_build.xml:71: Problem: failed to create task or type if
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

Solution:
It is a compatibility issue.
1. 
Right click on build.xml.

2.
Go to "Run As" --> 2 Ant  Select Classpath tab check Ant Home version (Sometimes eclipse selects  default ant version).
If the version listed is different, then change Ant Home Classpath to C:\XXXX\ant\X.X.X.

3.
Finally click on the Classpath tab --> Add External JARS..--> add ant-contrib.x.x.jar from C:\XXXX\ant\X.X.X\ant-contrib\ directory.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值