Can't build my project to android with Error: spawn EACCES

Ionic Info

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 3.1.6
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.9.2


ios-deploy : 1.9.1
Node       : v8.4.0
npm        : 5.5.1
OS         : macOS High Sierra
Xcode      : Xcode 9.2 Build version 9C40b

Environment Variables:

ANDROID_HOME : not set


backend : legacy

Result of typing Cordova requirements :

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-26,android-25,android-24,android-23,android-22,android-21
Gradle: installed /Applications/Android

Result of typing cordova build android --verbose

No scripts found for hook “before_build”.
No scripts found for hook “before_prepare”.
Checking config.xml and package.json for saved platforms that haven’t been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform android
Checking config.xml for saved plugins that haven’t been added to the project
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing…
Generating platform-specific config.xml from defaults for android at /Users/jpd/todolist-eunha/platforms/android/res/xml/config.xml
Merging project’s config.xml into platform-specific android config.xml
Merging and updating files from [www, platforms/android/platform_www] to platforms/android/assets/www
Wrote out android application name “todolist-eunha” to /Users/jpd/todolist-eunha/platforms/android/res/values/strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (0.0.1): 1
Wrote out Android package name “io.ionic.starter” to /Users/jpd/todolist-eunha/platforms/android/src/io/ionic/starter/
Updating icons at platforms/android/res
Updating splash screens at platforms/android/res
This app does not have additional resource files defined
Prepared android project successfully
No scripts found for hook “after_prepare”.
No scripts found for hook “before_compile”.
Running command: /usr/libexec/java_home
Command finished with error code 0: /usr/libexec/java_home
**below 2lines are the place where letters color is white. rest of it is blacked out letters. **
Running command: “/Applications/Android” -p /Users/jpd/todolist-eunha/platforms/android wrapper -b /Users/jpd/todolist-eunha/platforms/android/wrapper.gradle
Error: spawn EACCES


I used to developed android studio project well.
How can I solve this?

Upgrade your Cordova Android platform to something more recent.

Also make your you have installed standalone Gradle.

1 Like

I deleted and re install it but it keep happened.

how can I installed standalone gradle?

Download at, install.

What does that mean?

You should install a newer version, not just the same one again.