Pages

Thursday, November 23, 2017

cordova run android Error: spawn EACCES (MacOS)

When executing "cordova run android", I got error message: "Error: spawn EACCES". By using --verbose:
$ cordova run android --verbose ... Running command: "/Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle" -p /Users/myuserid/cordova/myApp/platforms/android wrapper -b /Users/myuserid/cordova/myApp/platforms/android/wrapper.gradle Error: spawn EACCES

When I checked the access permission of /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle, I found that there is no execute permission. The solution for the error is just by modifying the access permission:
$ sudo chmod +x /Applications/Android Studio.app/Contents/gradle/gradle-4.1/bin/gradle

That's all :)

No comments:

Post a Comment