Spawn EACCES

i am using Mac with latest version of ionic 3. i created a new blank project then added platform for android only. and then i run the build command for android and it produced the following error

ANDROID_HOME=/Users/erp/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
Error: spawn EACCES

[ERROR] An error occurred while running cordova build android (exit code 1).

please help me fix this problem. what i am doing wrong?

Thanks in advacne

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

You need to run this command, only difference is that, you need to check for the gradle version in your machine.

thank you so much for quick reply. setting permissions 755 for gradle and project directory did not fix the problem. Is it sure the problem’s cause is permissions?

is there anyway to find what file/directory has fewer permissions?