Here are my configurations:
OS: Ubuntu 14.04
Genymotion: 2.3.0
node: v0.10.25
npm: 1.3.10
cordova: 3.6.3-0.2.13
ionic: 1.2.7
After I created an Ionic project I tried adding the Android platform to it:
$ ionic start myApp sidemenu
...
$ cd myApp
$ ionic platform add android
Creating android project...
/home/mehran/.cordova/lib/npm_cache/cordova-android/3.6.3/package/bin/node_modules/q/q.js:126
throw e;
^
Error: Failed to run "android". Make sure you have the latest Android SDK installed, and that the "android" command (inside the tools/ folder) is added to your PATH.
at /home/mehran/.cordova/lib/npm_cache/cordova-android/3.6.3/package/bin/lib/check_reqs.js:43:27
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Socket.<anonymous> (child_process.js:956:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
Error: /home/mehran/.cordova/lib/npm_cache/cordova-android/3.6.3/package/bin/create: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
The problem is that there's no android
in the installed Genymotion folder. Am I supposed to install the original android SDK as well?
It's mention worthy that the installed Genymotion starts the emulated android on its own perfectly.
Yes you have to install the Android SDK. You can find it here: http://developer.android.com/sdk/index.html
You need also to add the tools folder into your PATH. So that it can run android
command
Export it like this:
export PATH=$PATH:<PATH_TO_ANDROID_SDK>/tools
With <PATH_TO_ANDROID_SDK>
the absolute path to the Android SDK.