Created
February 21, 2018 10:13
-
-
Save h3nr1ke/885e97c0c3f68dd1ca904dcc286ae777 to your computer and use it in GitHub Desktop.
Fix Error: spawn EACCES when running cordova build android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run it from your project folder | |
# based on this link | |
# https://github.com/ionic-team/ionic-cli/issues/2835 | |
# erroroccurs when run... | |
cordova build android | |
# ANDROID_HOME=/usr/local/Caskroom/android-platform-tools/27.0.1 | |
# JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home | |
# Error: spawn EACCES | |
# it happens firts time you run or fist time after gradle update | |
# to fix it, execute this on gradle folder | |
sudo chmod -R a+rwx /Library/Java/JavaVirtualMachines * | |
sudo chmod -R a+rwx * | |
chmod 777 /Applications/Android\ Studio.app/Contents/gradle/gradle-4.1/bin/gradle | |
#run again | |
cordova build android | |
# after the build, change back to 644 permission | |
chmod 644 /Applications/Android\ Studio.app/Contents/gradle/gradle-4.1/bin/gradle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment