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
To solve the EACCESS Problem please copy and save your platform custom icons / splashes / config.xml settings and delete the platform folder. after that run phonegap run android from your console again. it should work again. after that copy back the custom files / settings to the new platform folder.
You could brute force it if you are an admin and just
sudo chmod -R 777 ./platforms/
from the project root directory.Hard to diagnose the problem here. Could you add more information to the problem description?
For what I can see, which is not too much, it is because one of the executables doesn't have the right exec permissions for your user (assuming you are on Ubuntu 14.04 per your output).
Ensure Android SDK Tools and Platform-Tools, as well as Oracle JDK and Ant, are in your PATH with the appropriate permissions. Otherwise, put more information here.
For some reason build is not currently an executable file. To fix that, open the terminal and enter the following commands:
This is a common PhoneGap problem.
Most of the time it has to do with permissions on the
build
folder and script file.Try using:
chmod a+x
on them.My problem was solved by removing the map /platforms/android. After that I added the platform again.
cordova platform add android
For me it worked out, but I think there are multiple reasons this error is shown..
! Backup your icons !
Remember to backup your icons in /platforms/android/res/ Or copy the whole map as backup to be sure you don't lose your work...