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

后端 未结 7 1976
囚心锁ツ
囚心锁ツ 2020-12-14 08:05

i developed one project in ionic2

while i am doing ionic build android i am getting this error

my ionic info is

Cordova CLI: 6.3.0

相关标签:
7条回答
  • 2020-12-14 08:29

    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

    Enjoy :)

    0 讨论(0)
  • 2020-12-14 08:35

    hit this command

    sudo chmod -R a+rwx /appfolder
    

    It is caused by permission problem. More info on problem 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.

    Regards.

    0 讨论(0)
  • 2020-12-14 08:35

    Had the same problem, I got it fixed by giving 777 permissions on my Sdk folder : chmod -R 777 /YOURINSTALLOFANDROID/Sdk

    0 讨论(0)
  • 2020-12-14 08:36

    After upgrading to Android 3.2, gradle version has been changed up to 4.6.

    So I had to use this following command to modify gradle file permission in my Mac Terminal.

    sudo chmod 755 "/Applications/Android Studio.app/Contents/gradle/gradle-4.6/bin/gradle"
    
    0 讨论(0)
  • 2020-12-14 08:47

    Just Remove "node_modules" folder and re-install it using

    sudo npm i 
    

    Hope It get works ..Thanks..!

    0 讨论(0)
  • 2020-12-14 08:48

    I was using Cordova to run my Hybrid app on my Android device, and I got this error twice during the unsuccessful build ...

    Error: spawn EACCES

    @Krunel Vaghela's answer above helped me somewhat ...

    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

    But I kept having this error: "chmod: -r: no such file or directory"

    I was using this command:

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

    Note that my Android app is named "Android Studio.app" (with a space in the name). Solution is to simply wrap the path in quotes like so:

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

    NOTE: In order to find out which folder was having the permissions problem, I had to use this command:

    sudo build -verbose
    

    Which yielded the path to the permissions problem folder like this:

    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
    

    So take the path after "Running command:" - put that, inside quotes, after the ...

    chmod -r 777 
    

    And that's what saved my day.

    0 讨论(0)
提交回复
热议问题