getting Error: spawn EACCES while ionic build android in ubuntu 14.04

getting Error: spawn EACCES while ionic build android in ubuntu 14.04

我用ionic2开发了一个项目

当我进行离子构建时 android 我收到此错误

我的离子信息是

Cordova CLI:6.3.0

离子框架版本:2.0.0-beta.10

Ionic CLI 版本:2.0.0-beta.36

Ionic 应用程序库版本:2.0.0-beta.19

OS:分销商 ID:Ubuntu 描述:Ubuntu 14.04.5 LTS

节点版本:v4.4.7

我在 google 中进行了搜索,但没有适合我的解决方案..

我该如何修复这个错误?

点击这个命令

sudo chmod -R a+rwx /appfolder

是权限问题导致的。有关问题 here.

的更多信息

If this does not solve your problem then its probably issue of permission in your user profile directory. Try above command on user directory. It will take some time to apply permission.

此致。

有同样的问题,我通过在我的 Sdk 文件夹上授予 777 权限来修复它: chmod -R 777 /YOURINSTALLOFANDROID/Sdk

这是构建应用程序时的权限错误

您需要给予许可 Gradle

sudo chmod -R 777 /Applications/Android\ Studio\ 3.0\ Preview.app/Contents/gradle

尽情享受吧:)

构建 cordova 时使用 verbose:

cordova build -verbose

它会return给你需要chmod +x

的路径

我在 Android 设备上使用 Cordova 运行 我的 Hybrid 应用程序,在构建失败期间我遇到了两次此错误...

错误:生成 EACCES

@K运行el Vaghela 上面的回答对我有所帮助......

This is Permission Error While Building App

You Need to Give Permission Gradle

sudo chmod -R 777 /Applications/Android\ Studio\ 3.0\ Preview.app/Contents/gradle

但我一直有这个错误: "chmod: -r: no such file or directory"

我正在使用这个命令:

[Sandis-Macbook-Pro:Users sandi$ sudo chmod -R 777 /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle

请注意,我的 Android 应用名为 "Android Studio.app"(名称中带有 space)。解决方案是简单地将路径用引号括起来,如下所示:

[Sandis-Macbook-Pro:Users sandi$ sudo chmod -R 777 "/Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle"

注意:为了找出哪个文件夹有权限问题,我不得不使用这个命令:

sudo build -verbose

产生权限问题文件夹的路径如下:

ANDROID_HOME=/Users/sandi/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
Running command: "/Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle" -p /Users/sandi/Desktop/CORDOVA_NOV16/HHUB_NOV17/hhub_CURRENT/platforms/android wrapper -b /Users/sandi/Desktop/CORDOVA_NOV16/HHUB_NOV17/hhub_CURRENT/platforms/android/wrapper.gradle
Error: spawn EACCES

所以走 "Running command:" 之后的路径 - 把它放在引号内,在 ...

之后
chmod -r 777 

这就是拯救我一天的原因。

升级到Android3.2后,gradle版本已经升级到4.6.

所以我不得不使用以下命令在我的 Mac 终端中修改 gradle 文件权限。

sudo chmod 755 "/Applications/Android Studio.app/Contents/gradle/gradle-4.6/bin/gradle"

只需删除 "node_modules" 文件夹并使用

重新安装
sudo npm i 

希望它能奏效..谢谢..!