Ant で Android プロジェクトをビルドしようとすると失敗します。プロジェクトはライブラリに依存し、ライブラリは Google Play サービスに依存します。ant release を実行した後、次のエラーが表示されます。
[dex] Pre-Dexing D:\test\worskpace\MyAndroidLib\bin\classes.jar -> classes-ce7b0321dd8cbfdf7456c686f66a4bff.jar
[dx] The system cannot find the path specified.
[dx] The system cannot find the path specified.
[dx] The system cannot find the path specified.
android.bat を実行すると、「指定されたパスが見つかりません」というメッセージが 3 回表示されます。奇妙なのは、昨日それが機能したことです。
Hello World アプリを作成しました。これは cmd からの出力です。
D:\>cd D:\WORK\TEST\workspace11.4\TestApp
D:\WORK\TEST\workspace11.4\TestApp>android update project --path .
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
Updated local.properties
Updated file D:\WORK\TEST\workspace11.4\TestApp\proguard-project.txt
D:\WORK\TEST\workspace11.4\TestApp>ant clean
Buildfile: D:\WORK\TEST\workspace11.4\TestApp\build.xml
-check-env:
[checkenv] Android SDK Tools Revision 22.2.1
[checkenv] Installed at C:\Program Files (x86)\Android\android-sdk
-setup:
[echo] Project Name: MainActivity
[gettype] Project Type: Application
-pre-clean:
clean:
[getlibpath] Library dependencies:
[getlibpath] No Libraries
[subant] No sub-builds to iterate on
BUILD SUCCESSFUL
Total time: 0 seconds
D:\WORK\TEST\workspace11.4\TestApp>ant release
Buildfile: D:\WORK\TEST\workspace11.4\TestApp\build.xml
-set-mode-check:
-set-release-mode:
-release-obfuscation-check:
[echo] proguard.config is ${proguard.config}
-pre-build:
-check-env:
[checkenv] Android SDK Tools Revision 22.2.1
[checkenv] Installed at C:\Program Files (x86)\Android\android-sdk
-setup:
[echo] Project Name: MainActivity
[gettype] Project Type: Application
-build-setup:
[getbuildtools] Using latest Build Tools: 18.1.0
[echo] Resolving Build Target for MainActivity...
[gettarget] Project Target: Android 4.3
[gettarget] API level: 18
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: D:\WORK\TEST\workspace11.4\TestApp\bin
[mkdir] Created dir: D:\WORK\TEST\workspace11.4\TestApp\bin\res
[mkdir] Created dir: D:\WORK\TEST\workspace11.4\TestApp\bin\rsObj
[mkdir] Created dir: D:\WORK\TEST\workspace11.4\TestApp\bin\rsLibs
[mkdir] Created dir: D:\WORK\TEST\workspace11.4\TestApp\gen
[mkdir] Created dir: D:\WORK\TEST\workspace11.4\TestApp\bin\classes
[mkdir] Created dir: D:\WORK\TEST\workspace11.4\TestApp\bin\dexedLibs
[echo] ----------
[echo] Resolving Dependencies for MainActivity...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'release'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 3 source files to D:\WORK\TEST\workspace11.4\TestApp\bin\c
lasses
-post-compile:
-obfuscate:
-dex:
[dex] input: D:\WORK\TEST\workspace11.4\TestApp\bin\classes
[dex] input: D:\WORK\TEST\workspace11.4\TestApp\libs\android-support-v4.ja
r
[dex] Pre-Dexing D:\WORK\TEST\workspace11.4\TestApp\libs\android-support-v
4.jar -> android-support-v4-8e9e420982613f1e6fa190e136da6f5a.jar
[dx] The system cannot find the path specified.
[dx] The system cannot find the path specified.
[dx] The system cannot find the path specified.
BUILD FAILED
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:892: The followin
g error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:894: The followin
g error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:906: The followin
g error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:284: null returne
d: 1
Total time: 6 seconds
D:\WORK\TEST\workspace11.4\TestApp>