Android プロジェクトをビルドするために Eclipse を使用することがあります (ADT 19 を使用)。1 つのファイルのみを変更した場合、ビルドは Eclipse から非常に迅速に行われます (Ctr+B を使用)。しかし、ant スクリプト (「ant debug」を使用) コマンドを使用してビルドすると、時間がかかります。これは、すべてのファイルを再度構築しているためだと思います。
基本的に、ant ビルドはクリーン ビルドと同じ時間がかかります。アリのビルドを高速化する方法はありますか?
これがantスクリプトの出力です...
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