一尘不染

cordova build命令失败,退出代码为EACCES

node.js

科尔多瓦构建失败,错误代码: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
 ======================================

已将android平台添加到proj1 尝试重新安装,cordova但无法正常工作


阅读 212

收藏
2020-07-07

共1个答案

一尘不染

由于某种原因,build当前不是可执行文件。要解决此问题,请打开终端并输入以下命令:

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