Install problems on win 7

Hi,
I’ve spent hours trying to get past cordova emulate android from installation guide Chapter 2: Getting Everything Installed. Everthing works until that point and I’ve successfully brought up the emulator with emulator.exe -avd hello. Below is console messages from each process. Looking to do an angular/iconic poc.
TIA
John
Build
C:\Node\Apps\ionic\hello>cordova build android
Generating config.xml from defaults for platform "android"
Preparing android project
Compiling app on platform “android” via command “cmd” /c C:\Node\Apps\ionic\hello\platforms\android\cordova\build
Platform “android” compiled successfully.
Emulate
I get the following error
C:\Node\Apps\ionic\hello>cordova emulate android
Generating config.xml from defaults for platform "android"
Preparing android project
Running on emulator for platform “android” via command “cmd” /c C:\Node\Apps\ionic\hello\platforms\android\cordova\run -
-emulator
Error: An error occurred while emulating/deploying the android project.
events.js:72
throw er; // Unhandled ‘error’ event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)

at ChildProcess.<anonymous> (C:\Users\jrtWin7\AppData\Roaming\npm\node_modules\cordova\src\emulate.js:67:22)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)

android kitkat sdk is installed?

or maybe you found the solution there

give it a try :slight_smile:

P
I was facing the same issue on win7 it was not emulating because I configured my android mobile for emulaton.

Please make sure that you have install / configured cordova as per instruction given in getting started guide

  1. http://ionicframework.com/getting-started/
  2. http://ionicframework.com/docs/guide/installation.html

Instead of running “cordova build android”, install and use Ionic plugin ( steps are given in gettting started guide)

run command "C:/IonicApp/Todo/> Ionic run android.

Hi,
I got the emulator to work with the following
npm uninstall cordova
npm install -g cordova@3.0.0

I then install SDK 4.2.2 (API17) and the “cordova emulate android” command works!

So I make sure all installation for latest cordova (see attached) followed getting-started but still fail on the “ionic emulate android”. command.
Next added device with command android avd (myApp 4.4.2, arm, nexus7, 768 mem) and still
have the same issue.
Error: An error occurred while emulating/deploying the android project.
events.js:72
throw er; // Unhandled ‘error’ event
^
Error: spawn ENOENT
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)

TIA
John

could you upgrade cordova to version 3.3.0?

Yes I did
1 to uninstall “ver 3.0.0” npm uninstall cordova -g
2 to install 3.3.x npm install -g cordova.
cordova -v
3.3.1-0.4.2

I’ve reproduced the same error on 2 different windows 7/64 bit computers. Another programmer got the same error on a third I’ve carefully followed the instructions in Chap 2 and not sure how to proceed. I guess I’m consistently making the same mistake,

Could you write your steps down to install cordova and ionic?
Maybe you could run the same steps on a *nix machine?

I had the same problem,

To get emulator work: First I create an AVD with an Android version on the AVD manager,
and then start it with the same AVD Manager.

And then, with the opened emulator, cordova emulate android should work

Hi,
Thanks for all replies, I will pick this up tomorrow in office.
I had some limited success with the following and will try again tomorrow. Limited in that the emulator displays but the app fails. Will test on other computers and post.

I’ve also documented my install and will also organize tomorrow

John
goto hello dir
emulator.exe -avd hello
wait for cmd prompt
cordova emulate android

Hi,
I got iconic to work by doing a git clone of the seed project.
A comparison shows that following tutorial the project is missing
which when copied now runs the emulator.
Seems like a problem with ionic start…

John