cordova build Command failed with exit code EACCES

twid picture twid · Jun 25, 2014 · Viewed 40.3k times · Source

Cordova build failed with error code : EACCESS

$ cordova build android
Running command: /home/user/proj1/platforms/android/cordova/build 
execvp(): Permission denied
Error: /home/user/proj1/platforms/android/cordova/build: Command failed with exit code EACCES
    at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.EventEmitter.emit (events.js:95:17)
    at Process.ChildProcess._handle.onexit (child_process.js:795:12)

 ======================================   
     OS  : Ubuntu 14.04
     npm version: 1.4.16
     cordova version : 3.5.0-0.2.4
 ======================================

have added android platform to proj1 tried to re-installing cordova but did not work

Answer

malcubierre picture malcubierre · Sep 10, 2014

For some reason build is not currently an executable file. To fix that, open the terminal and enter the following commands:

$ cd <your-project-directory>/platforms/android/cordova
$ chmod a+x build