on ionic build android I'm getting
Running command: /Users/behrad/workspace/ionicApp/hooks/after_prepare/010_add_platform_class.js /Users/behrad/workspace/ionicApp
add to body class: platform-android
Running command: /Users/behrad/workspace/ionicApp/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/behrad/workspace/ionicApp
Running command: /Users/behrad/workspace/ionicApp/platforms/android/cordova/build
ANDROID_HOME=/Users/behrad/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
Running: /Users/behrad/workspace/ionicApp/platforms/android/gradlew cdvBuildDebug -b /Users/behrad/workspace/ionicApp/platforms/android/build.gradle -Dorg.gradle.daemon=true
error caught: Error: spawn EACCES
/Users/behrad/workspace/ionicApp/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error: spawn EACCES
I chmod a+x gradelw everytime, but after running build command I see it is changed again to
Behrads-MacBook-Pro:ionicApp behrad$ ls -lt platforms/android/
total 64
-rw-r--r-- 1 behrad staff 11187 Jun 30 21:25 build.gradle
drwxr-xr-x 3 behrad staff 102 Jun 30 21:25 gradle
-rw-r--r-- 1 behrad staff 5080 Jun 30 21:25 gradlew
-rw-r--r-- 1 behrad staff 66 Jun 30 21:25 settings.gradle
-rw-r--r-- 1 behrad staff 1453 Jun 30 21:24 AndroidManifest.xml
drwxr-xr-x 4 behrad staff 136 Jun 30 21:24 assets
drwxr-xr-x 23 behrad staff 782 Jun 30 21:24 res
drwxr-xr-x 4 behrad staff 136 Jun 30 21:24 src
drwxr-xr-x 8 behrad staff 272 Jun 30 21:24 CordovaLib
drwxr-xr-x 17 behrad staff 578 Jun 30 21:24 cordova
drwxr-xr-x 2 behrad staff 68 Jun 30 21:24 libs
drwxr-xr-x 4 behrad staff 136 Jun 30 21:24 platform_www
-rw-r--r-- 1 behrad staff 601 Jun 30 21:24 project.properties
and my info
Behrads-MacBook-Pro:ionicApp behrad$ ionic info
Your system information:
Cordova CLI: 5.1.1
Ionic Version: 1.0.1
Ionic CLI Version: 1.5.5
Ionic App Lib Version: 0.2.2
ios-deploy version: 1.7.0
ios-sim version: 4.1.1
OS: Mac OS X Yosemite
Node Version: v0.12.3
Xcode version: Xcode 6.3 Build version 6D570
:(
this is happening only with android-cordova 4.0.2 !!!
+1 having the same issue
+1
In my case I figured out that the issue was triggered by a local notification plugin which I've successfully used in other phonegap projects. Don't have a solution, but the fixed the error in my case just by removing this plugin.
i'm not using this plugin and it's not working ..
i'm on Debian 8 64bits
I am also facing this issue
same issue here
Mine was due to permission issue in android-sdk folder.
Fixed it with chmod 777 -R ~/android-sdk
Hello! Thanks for opening an issue with us! As this seems like more of a support question i will urge that you ask this question on our forum (forum.ionicframework.com). Thanks for using Ionic!
Most helpful comment
Mine was due to permission issue in android-sdk folder.
Fixed it with chmod 777 -R ~/android-sdk