[Error] java.io.IOException: build on Android device failed at task 'processDebugResources'

I am using Ubuntu 12.04.4 LTS and my android phone is

Samsung Galaxy S3 Neo I93001 Android version 4.3

~$ adb devices
List of devices attached

  • daemon not running. starting it now on port 5037 *
  • daemon started successfully *
    4e1eb1e1 device

When trying to build a sample app in android device getting this error.

Error in Ubuntu 12.04 running on Android device

~/socially1-3$ meteor run android-device --verbose

Getting installed version for platform android in Cordova project
Checking Cordova requirements for platform Android
[[[[[ /socially1-3 ]]]]]

=> Started proxy.
=> Started MongoDB.
Local package version is up-to-date: accounts-base@1.2.2

Local package version is up-to-date: webapp-hashing@1.0.5

Preparing Cordova project from app bundle
Processing mobile-config.js
Copying resources for mobile apps
Writing new config.xml
Preparing Cordova project for platform Android

WARNING: You are testing your app on a remote device. For the mobile app to be able to connect to the local server, make sure your device is on
the same network, and that the network configuration allows clients to talk to each other (no client isolation).
Running Cordova app for platform Android with options --device
ANDROID_HOME=/android-sdk-linux
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64

Running: /socially1-3/.meteor/local/cordova-build/platforms/android/gradlew cdvBuildDebug -b /socially1-3/.meteor/local/cordova-build/platforms/android/build.gradle -PcdvBuildArch=arm -Dorg.gradle.daemon=true
=> Started your app.

=> App running at: http://localhost:3000/
:preBuild
:compileDebugNdk UP-TO-DATE
:preDebugBuild
:checkDebugManifest
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:preBuild
:CordovaLib:preDebugBuild
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:CordovaLib:processDebugResources’.

java.io.IOException: Cannot run program “/android-sdk-linux/build-tools/23.0.2/aapt”: error=2, No such file or directory

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 29.25 secs
Starting app on Android Device
/socially1-3/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /socially1-3/.meteor/local/cordova-build/platforms/android/gradlew with args: cdvBuildDebug,-b,/socially1-3/.meteor/local/cordova-build/platforms/android/build.gradle,-PcdvBuildArch=arm,-Dorg.gradle.daemon=true
=> Errors executing Cordova commands:

While running Cordova app for platform Android with options --device:
Error: Command failed: /socially1-3/.meteor/local/cordova-build/platforms/android/cordova/run
–device

at ChildProcess.exitCallback (/tools/utils/processes.js:137:23)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)

ExitWithCode:1

aapt file exists in that path