Skip to content Skip to sidebar Skip to footer

Ionic Build Android, Error: Spawn Eacces

If I follow this steps to create a new app: Rubens-MacBook-Pro:~ rlopez$ npm install -g cordova ionic Rubens-MacBook-Pro:~ rlopez$ ionic start myApp tabs Rubens-MacBook-Pro:~ rlope

Solution 1:

Got the same error today. Thanks to the comments above, here is how I fixed it.

Ran:

cordova build android --verbose

and it showed me where it got the "Permission Denied" error... In my case it was:

Running command: /usr/libexec/java_home
Command finished with error code 0: /usr/libexec/java_home
ANDROID_HOME=/Users/mj/phonegap/adt-bundle-mac-x86_64-20140321/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home
Running command: "/Applications/Android Studio.app/Contents/gradle/gradle-2.2.1/bin/gradle"
 -p /Users/mj/EduceMobile/app/platforms/android wrapper -b /Users/mj/EduceMobile/app/platfo
rms/android/wrapper.gradle

To fix, ran:

sudo chmod 755 /Applications/Android\ Studio.app/Contents/gradle/gradle-2.2.1/bin/gradle

...and

......
:cdvBuildDebug

BUILD SUCCESSFUL

Total time: 2 mins 44.195 secs

Hope it helps.

Solution 2:

Above solutions didn't work for me. I solved error with this command:

chmod 755 platforms/android/gradlew

Solution 3:

For those who gets similar error after updating Android Studio to version 3.x, you can run the following command to fix it:

sudo chmod 755 /Applications/Android\ Studio.app/Contents/gradle/gradle-4.1/bin/gradle

Hopefully it helps!

Solution 4:

Only for OSX --- Go to Applications Folder from finder and Simply rename Android Studio App Package name by removing space between.

Before : Android Studio After: AndroidStudio

There is no issue of permissions by default just the space was the problem.

Cheers !

Solution 5:

Just encountered the same issue, and I don't think it has anything to do with sudo - that command is simply missing the execute permission

chmod +x hooks/after_prepare/010_add_platform_class.js

Post a Comment for "Ionic Build Android, Error: Spawn Eacces"