I use eclipse sometimes to build my android project(Using ADT 19). If i have modified only 1 files then the build happens very quickly from Eclipse (Using Ctr+B). But if i use the ant script (I use “ant debug”) command to build it takes longer. I believe this is because, it is building all the files again.
Basically ant build takes the same time as that of a clean build. Is there some way to speed up the ant build ?
Here is the output of ant script…
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
Fixed it myself. My IDE was set to clean the project and build it every time. It had ant clean debug. Removed “clean” and it works…