在参考了其他几个 问题之后,我发现这些答案都不适用于我的项目。将 jar 放入每个单独模块的 /libs 文件夹中,ant 构建可以正确运行并产生输出。在删除所有 /libs 文件夹并在我需要的每个模块中包含一个文件(又名)后,ant build 已停止工作。 ant.properties
build.properties
蚂蚁属性:
# This file is used to override default values used by the Ant build system.
#
# This file must be checked in Version Control Systems, as it is
# integral to the build system of your project.
# This file is only used by the Ant script.
# You can use this to override default values such as
# 'source.dir' for the location of your java source folder and
# 'out.dir' for the location of your output folder.
jar.libs.dir=../ExternalJars/libs
构建.xml
<property file="ant.properties" />
<loadproperties srcFile="project.properties" />
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
<target name="full-debug" depends="debug">
</target>
<target name="full-release" depends="clean,release">
</target>
据我所知,这些文件是正确编写的——相对于 ant.properties 文件,路径都是正确的,jar 是它们应该在的位置,模块使用所有正确的类和部分,等等。
想法?