我有时使用 eclipse 来构建我的 android 项目(使用 ADT 19)。如果我只修改了 1 个文件,那么从 Eclipse(使用 Ctr+B)快速构建。但是如果我使用 ant 脚本(我使用“ant debug”)命令来构建它需要更长的时间。我相信这是因为它正在重新构建所有文件。
基本上,ant build 与 clean build 所需的时间相同。有什么方法可以加快 ant build 的速度吗?
这是蚂蚁脚本的输出......
set-mode-check:
-set-debug-files:
-set-debug-mode:
-debug-obfuscation-check:
-setup:
[echo] Creating output directories if needed...
[echo] Gathering info for Astro...
[setup] Android SDK Tools Revision 19
[setup] Project Target: Android 2.3.3
[setup] API level: 10
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] No library dependencies.
[setup]
[setup] ------------------
[setup] API<=15: Adding annotations.jar to the classpath.
[setup]
[setup] ------------------
-build-setup:
-pre-build:
-code-gen:
[echo] ----------
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] Found Deleted Target File
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.
-pre-compile:
-compile:
[javac] Compiling 3 source files to C:\Sample\bin\classes
-post-compile:
-obfuscate:
-dex:
[dex] Found Deleted Target File