Getting Cordova/Phonegap to emulate on Genymotion virtual device

numediaweb picture numediaweb · Dec 12, 2013 · Viewed 25.1k times · Source

Using the Cordova CLI, I set up an app and build it:

cordova create hi com.example.hi Hi 
cd hi
cordova platform add android
cordova build android

I run Genymotion and start a device named "api9". I run the Android Debug Bridge adb devices and it shows as

192.168.8.101:5555

I try to launch the app with cordova emulate android but I get:

Error: An error occurred while emulating/deploying the android project. ...spawn ENOENT

However, launching the Android Virtual Device manager and starting an emulated device; the cordova emulate android works and adb devices lists;

192.168.8.101:5555
emulator-5554

What should I do to make Cordova emulate through Genymotion devices?

Answer

Nextneed picture Nextneed · Dec 12, 2013

It seems that adb sees genymotion virtual device as a real device and not as an emulated one, try cordova run android instead of cordova emulate android.