Edu M
Edu M

Reputation: 604

w7 x64 vs2013 sp4 tools for cordova ctp 3.1 - cordova project does not compile for android platform - cannot run program [...]\CordovaLib\${aapt}

Build mode is 'device' on android platform

Build output:

1>  -build-setup: (TaskId:29)
1>  [getbuildtools] Using latest Build Tools: 22.0.1 (TaskId:29)
1>       [echo] Resolving Build Target for CordovaApp... (TaskId:29)
1>  [gettarget] Project Target:   Android 4.4.2 (TaskId:29)
1>  [gettarget] API level:        19 (TaskId:29)
1>       [echo] ---------- (TaskId:29)
1>       [echo] Creating output directories if needed... (TaskId:29)
1>      [mkdir] Created dir: C:\Egestiona\main\source\cordova sample\bld\Debug\platforms\android\CordovaLib\res (TaskId:29)
1>      [mkdir] Created dir: C:\Egestiona\main\source\cordova sample\bld\Debug\platforms\android\CordovaLib\libs (TaskId:29)
1>      [mkdir] Created dir: C:\Egestiona\main\source\cordova sample\bld\Debug\platforms\android\CordovaLib\ant-build (TaskId:29)
1>      [mkdir] Created dir: C:\Egestiona\main\source\cordova sample\bld\Debug\platforms\android\CordovaLib\ant-build\res (TaskId:29)
1>      [mkdir] Created dir: C:\Egestiona\main\source\cordova sample\bld\Debug\platforms\android\CordovaLib\ant-build\rsObj (TaskId:29)
1>      [mkdir] Created dir: C:\Egestiona\main\source\cordova sample\bld\Debug\platforms\android\CordovaLib\ant-build\rsLibs (TaskId:29)
1>      [mkdir] Created dir: C:\Egestiona\main\source\cordova sample\bld\Debug\platforms\android\CordovaLib\ant-gen (TaskId:29)
1>      [mkdir] Created dir: C:\Egestiona\main\source\cordova sample\bld\Debug\platforms\android\CordovaLib\ant-build\classes (TaskId:29)
1>      [mkdir] Created dir: C:\Egestiona\main\source\cordova sample\bld\Debug\platforms\android\CordovaLib\ant-build\dexedLibs (TaskId:29)
1>       [echo] ---------- (TaskId:29)
1>       [echo] Resolving Dependencies for CordovaApp... (TaskId:29)
1>  [dependency] Library dependencies: (TaskId:29)
1>  [dependency] No Libraries (TaskId:29)
1>  [dependency]  (TaskId:29)
1>  [dependency] ------------------ (TaskId:29)
1>   (TaskId:29)
1>  -code-gen: (TaskId:29)
1>  [mergemanifest] Merging AndroidManifest files into one. (TaskId:29)
1>  [mergemanifest] Manifest merger disabled. Using project manifest only. (TaskId:29)
1>       [echo] Handling aidl files... (TaskId:29)
1>       [aidl] No AIDL files to compile. (TaskId:29)
1>       [echo] ---------- (TaskId:29)
1>       [echo] Handling RenderScript files... (TaskId:29)
1>       [echo] ---------- (TaskId:29)
1>       [echo] Handling Resources... (TaskId:29)
1>       [aapt] Generating resource IDs... (TaskId:29)
1>   (TaskId:29)
1>  BUILD FAILED (TaskId:29)
1>  C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:597: The following error occurred while executing this line: (TaskId:29)
1>  C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:649: The following error occurred while executing this line: (TaskId:29)
1>  C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:694: Execute failed: java.io.IOException: Cannot run program "C:\Egestiona\main\source\cordova sample\bld\Debug\platforms\android\CordovaLib\${aapt}" (in directory "C:\Egestiona\main\source\cordova sample\bld\Debug\platforms\android\CordovaLib"): CreateProcess error=2, El sistema no puede encontrar el archivo especificado (TaskId:29)

Looks like \bld\Debug\platforms\android\CordovaLib\${aapt} cannot be resolved.

ADT_HOME, ANT_HOME, JAVA_HOME are correct and part of the system PATH, I have copied aapt.exe and /lib from android-sdk\build-tools (22.0.1) to android-sdk\platform-tools (that has been reported to sometimes work)

I cannot figure this out, I am pretty new to this tooling. Is it a x86/x64 issue? (I'm on w7x64.) Do android 4.4.2 and build tools 22.0.1 go together? Is there a problem with ant?

I'm firing off my vs2015RC to further try my luck, in the meantime any help with vs2013 would be greatly appreciated.

Upvotes: 1

Views: 151

Answers (1)

Edu M
Edu M

Reputation: 604

Pinned it down to this. Basically Tools for cordova ctp 3.1 does not seem to be compatible with Android SDK Tools 24.3.2.

I downgraded to Android SDK Tools 24.2 and updated Android SDK build-tools and Android SDK platform-tools to their latest version (22.0.1 and 22 resp.), in that particular order.

Now my android build generates the apk just fine. Note Tools for cordova will still warn you Android SDK build-tools 19.1 is missing - probably safe to ignore.

Upvotes: 1

Related Questions