Error loading a new app in genymotion android emulator

I started with Ionic today. Wanted to test it out quickly but am not able to test the sample app in a genymotion emulator.
I followed all the steps untill “ionic run android” (‘run’ instead of ‘emulate’ for genymotion). But am getting the following error:

C:\ionic2\mytodo\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error: Device communication timed out. Try unplugging & replugging the device.
at null._onTimeout (C:\ionic2\mytodo\platforms\android\cordova\node_modules\q\q.js:1717:25)
at Timer.listOnTimeout (timers.js:110:15)

I tried it both in the CMD and console2 prompts. The app is blank. Just did build and run. I have used the same genymotion emulator successfully with a plain cordova app (without ionic).

EDIT
Interestingly if I drag the apk file directly into the open emulator, it starts running the app. Am I missing something here?

Did you first run genymotion virtual device and then execute ionic run android ?

Yes I did run the emulator before running the command.

So lets make sure everything is setup.

You have the android sdk install correct?

In genymotion, in the vm selection window, you can change the path to the android sdk. By default, genymotion will point to its own version. Change this to be the path that you have set

1 Like

Mike - Thanks. Your tip seems to have solved it for me.

I say “seems” because it started working when I changed it to android SDK. But then out of curiosity I just changed it back to the default genymotion SDK to see what happens. And it worked with the genymotion SDK too. :confused:

One thing that I am doing different than yesterday is that I am using Console 2 to start, add android, build and run my app. Yesterday I was using CMD till build. Not sure if that’s even remotely the root cause.

In any case, I am up and running now. Thanks.