运行带有多个外部jar和源的android项目

时间:2015-10-09 09:10:18

标签: java android eclipse ant jar

我正在尝试使用包含多个源和外部第三方jar的ant编译一个adroid项目。 它可以在eclipse中正常工作但我要求它使用ant运行命令行。

我的custom_rules.xml如下所示:

<?xml version="1.0" encoding="UTF-8"?> <project name="CustomRules">
     <target name="-pre-build" >
             <copy todir="tmp-src" >
                     <fileset dir="src" includes="**" />
                     <fileset dir="talkAndroid" includes="**" />
                     <fileset dir="commonAndroid" includes="**" />
                    <fileset dir="cocos2dAndroid" includes="**" />
             </copy>
             <classpath id="classpath" description="The default classpath.">
                     <pathelement path="${classpath}"/>
                     <fileset dir="external_libs">
                             <include name="*.jar"/>
                     </fileset>
             </classpath>
     </target>
     <target name="-post-build" >
             <delete dir="tmp-src" />
     </target> </project>

它不适用于external_libs并且无法找到外部库,如果我将这些jar从external_libs复制到libs文件夹...会生成重复的类错误!

我该怎么办?

0 个答案:

没有答案
相关问题