\build\build.xml:350: Problem: failed to create task or type foreach 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.
先看 官方配置
<taskdef resource="net/sf/antcontrib/antlib.xml"> <classpath> // 这里改成 ant-contrib 对应的jar包路径 <pathelement location="/usr/share/java/lib/ant-contrib-version.jar"/> </classpath> </taskdef>
看 图文教程
解决Ant foreach任务配置错误
本文详细解析了在使用Ant的foreach任务时遇到的“failed to create task or type foreach”错误,提供了检查拼写、确认自定义任务声明及presetdef/macrodef声明的方法,并给出了官方配置示例和图文教程链接。
1470

被折叠的 条评论
为什么被折叠?



