android - 使用ant构建Android项目时如何在build.properties中指定多个源文件夹?

标签 android ant build directory

显然,我可以使用 build.properties 中的 source.dir 属性指定源文件夹 - 但如果我想指定多个源文件夹怎么办?

以下注释来自Android SDK工具生成的build.xml文件:

<!-- The build.properties file can be created by you and is never touched
     by the 'android' tool. This is the place to change some of the default property values
     used by the Ant rules.
     Here are some properties you may want to change/update:

     application.package
         the name of your application package as defined in the manifest. Used by the
         'uninstall' rule.
     source.dir
         the name of the source directory. Default is 'src'.
     out.dir
         the name of the output directory. Default is 'bin'.

     Properties related to the SDK location or the project target should be updated
      using the 'android' tool with the 'update' action.

     This file is an integral part of the build system for your application and
     should be checked in in Version Control Systems.

     -->

注意:我不关心在 Eclipse 中构建 - 我使用 ant 设置自动构建。

最佳答案

您是否尝试使用冒号分隔路径?我的 build.properties 看起来像这样:

source.dir=src:src2:src3:src4:src5

关于android - 使用ant构建Android项目时如何在build.properties中指定多个源文件夹?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3239321/

相关文章:

java - 使用 python 的 Android 应用程序

ant - 使用 ant 脚本更改目录 (CD)

java - 尝试运行 ant - 出现错误

python - 使用 SCons 进行真正的分层构建?

android - 使用sed操作xml文件

android - Eclipse 没有响应 (Windows 8)

java - Ant gwtcompile ClassNotFoundException

ios - 如何构建 native C 源代码以创建用于 Unity 的库,以用于 iOs 平台?

Android Studio Gradle 卡住在 :app:transformClassesWithDexForRelease

android - 如何给下载一个进度条?