用eclipse导出android时总是会出现有类没有导出的现象,感觉很麻烦,就用ant些了脚本,在eclipse中执行脚本没问题,但是在命令行下执行会出现
Problem: failed to create task or type foreach问题,出问题的脚本是
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${path.build}/ant-contrib.jar"/>
是使用ant的一个扩展包的时候的问题,我在这里明明是写了jar包的目录了,可是还是说找不到。
后来发现吧classpath写绝对路径就可以了,不明白为什么?
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="/home/lib/ant-contrib.jar"/>
这样在命令行执行就不会报错了!