I am trying to build android and i am receiving the following error after i run : cordova ionic run android -verbose
Running command: sudo cordova run android -verbose
No scripts found for hook "before_run".
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/codehacker/Documents/projects/ionicProjects/newsApp/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 "News App" to /Users/codehacker/Documents/projects/ionicProjects/newsApp/platforms/android/res/values/strings.xml
Wrote out Android package name "com.phatisa.newsapp" to /Users/codehacker/Documents/projects/ionicProjects/newsApp/platforms/android/src/com/phatisa/newsapp/MainActivity.java
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".
Running command: /usr/libexec/java_home
Command finished with error code 0: /usr/libexec/java_home
ANDROID_HOME=/Users/codehacker/documents/sdk/android
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home
Running command: "/Applications/Android Studio.app/Contents/gradle/gradle-2.4/bin/gradle" -p /Users/codehacker/Documents/projects/ionicProjects/newsApp/platforms/android wrapper -b /Users/codehacker/Documents/projects/ionicProjects/newsApp/platforms/android/wrapper.gradle
Error: spawn EACCES
I currently have the following environment:
@ionic/cli-utils : 1.9.0
ionic (Ionic CLI) : 3.9.0
global packages:
Cordova CLI : 7.0.1
local packages:
@ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.6.0
System:
ios-deploy : 1.9.1
ios-sim : 5.0.3
Node : v6.10.0
npm : 5.3.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
iOS is building just fine but for some reason android is not working at all.
please help with this one, I have been bashing my head for the past 5 hours.