I’m trying to follow the Getting started tutorial for Ionic but with no success. I’ve installed Ionic 2.1.1 (installed via NPM). This is the complete steps I took:
[~/sandbox]
$ ionic -v
2.1.1
[~/sandbox]
$ ionic start myApp tabs
Creating Ionic app in folder /Users/tuta/sandbox/myApp based on tabs project
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
[=============================] 100% 0.0s
Downloading: https://github.com/driftyco/ionic-starter-tabs/archive/master.zip
[=============================] 100% 0.0s
Installing npm packages...
Adding initial native plugins
[=============================] 100% 0.0s
Adding in iOS application by default
add to body class: platform-ios
Downloading: https://github.com/driftyco/ionic-default-resources/archive/master.zip
[=============================] 100% 0.0s
Saving your Ionic app state of platforms and plugins
Saved platform
Saved plugins
Saved package.json
♬ ♫ ♬ ♫ Your Ionic app is ready to go! ♬ ♫ ♬ ♫
Some helpful tips:
Run your app in the browser (great for initial development):
ionic serve
Run on a device or simulator:
ionic run ios[android,browser]
Test and share your app on device with Ionic View:
http://view.ionic.io
Build better Enterprise apps with expert Ionic support:
http://ionic.io/enterprise
New! Add push notifications, live app updates, and more with Ionic Cloud!
https://apps.ionic.io/signup
[~/sandbox]
$ cd myApp
[~/sandbox/myApp]
$ ionic platform add android
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: com.ionicframework.myapp708260
Name: myApp
Activity: MainActivity
Android target: android-23
Android project created with cordova-android@5.2.2
Installing "cordova-plugin-console" for android
Installing "cordova-plugin-device" for android
Installing "cordova-plugin-splashscreen" for android
Installing "cordova-plugin-statusbar" for android
Installing "cordova-plugin-whitelist" for android
This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
Installing "ionic-plugin-keyboard" for android
Running command: /Users/tuta/sandbox/myApp/hooks/after_prepare/010_add_platform_class.js /Users/tuta/sandbox/myApp
add to body class: platform-android
[~/sandbox/myApp]
$ ionic build android
Running command: /Users/tuta/sandbox/myApp/hooks/after_prepare/010_add_platform_class.js /Users/tuta/sandbox/myApp
add to body class: platform-android
ANDROID_HOME=/Users/tuta/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home
Error: spawn EACCES
[~/sandbox/myApp]
$ ionic emulate android
Running command: /Users/tuta/sandbox/myApp/hooks/after_prepare/010_add_platform_class.js /Users/tuta/sandbox/myApp
add to body class: platform-android
ANDROID_HOME=/Users/tuta/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home
Error: spawn EACCES
[~/sandbox/myApp]
$ ionic hooks add
Adding in default Ionic Cordova hooks
Added default Ionic Cordova hooks
[~/sandbox/myApp]
$ ionic build android
Running command: /Users/tuta/sandbox/myApp/hooks/after_prepare/010_add_platform_class.js /Users/tuta/sandbox/myApp
add to body class: platform-android
Running command: /Users/tuta/sandbox/myApp/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/tuta/sandbox/myApp
ANDROID_HOME=/Users/tuta/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home
Error: spawn EACCES