phonegap-cli

Error: spawn EACCES phonegap emulate on linux


Encountering error while trying to emulate an android application using phonegap. I have built the project but while running phonegap emulate I get an error which is

 `Error: spawn EACCES
    at exports._errnoException (util.js:1028:11)
    at ChildProcess.spawn (internal/child_process.js:313:11)
    at Object.exports.spawn (child_process.js:387:9)
    at /home/adarsh/Documents/hack2help/platforms/android/cordova/lib/emulator.js:205:18
    at _fulfilled (/home/adarsh/Documents/hack2help/platforms/android/cordova/node_modules/q/q.js:835:54)
    at self.promiseDispatch.done (/home/adarsh/Documents/hack2help/platforms/android/cordova/node_modules/q/q.js:864:30)
    at Promise.promise.promiseDispatch (/home/adarsh/Documents/hack2help/platforms/android/cordova/node_modules/q/q.js:797:13)
    at /home/adarsh/Documents/hack2help/platforms/android/cordova/node_modules/q/q.js:605:44
    at runSingle (/home/adarsh/Documents/hack2help/platforms/android/cordova/node_modules/q/q.js:138:13)
    at flush (/home/adarsh/Documents/hack2help/platforms/android/cordova/node_modules/q/q.js:126:13)`

I have tried multiple solutions from the internet, granting permissions to the application folder didn't work.


Solution

  • In cordova I set chmod -R 777 username to my Android-sdk directory, this solved my problem.