Cordova Android构建立即失败[错误:生成EACCES] [英] Cordova android build fails immediately [Error: spawn EACCES]

查看:117
本文介绍了Cordova Android构建立即失败[错误:生成EACCES]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始使用Cordova(PhoneGap)并尝试使用它构建我的第一个项目,但是我在编译步骤时遇到了一个问题-当我尝试构建时(在追踪我崩溃的问题时build进入preparecompile的步骤,据我所知,前一个工作正常)我看到了:

I am just getting started with with Cordova ( PhoneGap ) and trying to build my first project with it, however I am running into a problem with my compilation step- when I try to build ( in tracking down the problem I broke down the build step into prepare and compile and the former works fine as far as I know ) I see this:

~/Projects/MyProject$ cordova compile android
Compiling app on platform "android" via command "/media/glenatron/local disk/Projects/Cordova/MyProject/platforms/android/cordova/build" 
{ [Error: spawn EACCES] code: 'EACCES', errno: 'EACCES', syscall: 'spawn' }

现在,我可以确定这是一个权限问题,但是没有Node或Cordova的经验,但是我对如何解决它感到困惑.似乎正在尝试产生另一个进程-也许是Android SDK? -失败了.

Now from what I can tell this is a permissions problem, but having no Node or Cordova experience yet I am at a loss as to how to troubleshoot it. It looks as though it is trying to spawn another process - maybe the Android SDK? - and it is failing.

有没有办法让Node或Cordova向我提供有关正在发生的事情的更多信息,或者某个地方的日志文件可以帮助我找出问题所在?

Is there a way I can ask Node or Cordova to give me more information on what is going on or is there a log file somewhere that will help me to track down what the problem is?

我意识到cordova有一个--verbose开关,当我激活它时,我得到了上面的输出以及另外几行...

I realised cordova has a --verbose switch and when I activated it I get the above output with an additional couple of lines...

Error: spawn EACCES
    at errnoException (child_process.js:980:11)
    at Process.ChildProcess._handle.onexit (child_process.js:771:34)

不幸的是,他们似乎并没有提供更多的信息,例如哪个无法启动的过程.

Unfortunately, they don't seem to actually give much more information, like which process it can't start.

推荐答案

这是一个权限问题,只需执行:

It's a permission issue, just execute:

chmod 777 "/media/glenatron/localdisk/Projects/Cordova/MyProject/platforms/android/cordova/build"

那应该可以解决问题.

这篇关于Cordova Android构建立即失败[错误:生成EACCES]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆