I am trying to use the Android emulator to install an app on it.
Unfortunately the emulator is never starting up. I use the following command in my cordova project:
cordova emulate android
The last output I get from console is:
Waiting for emulator...
But the emulator does never start (I waited 45 minutes now).
The path variables are all correctly set and I can start the emulator using Eclipse or Android studio but not using the command from cordova.
Any hints?
Solved
If you can start the emulator through android studio, then as a work around start the emulator outside and run the command
cordova run android
It will deploy your app in the already running emulator.
Check emulator path settings https://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_index.md.html If not able to execute then do : use the alternate shell interface:
$ /path/to/project/cordova/run --emulator
Instead of relying on whichever emulator is currently enabled within the SDK, you can refer to each by the names you supply:
$ /path/to/project/cordova/run --target=NAME
Check the documentation above and see whether your PC supports virtualization or not.
I was getting the same issue, I resolved it by:
Open Android device manager, click on window -> Android Virtual Device Manager
There you will see listing of all the Android Virtual Devices, if you see any device with repairable icon on it, just click on repair and then try. It works.
I had the same problem. Though cordova started the emulator, the command line kept on saying 'Waiting for emulator...' forever.
The trick is, before running the command:
cordova run android make sure you navigate into the android platform folder. That is, don't run the command from within the
/project folder
but instead from within
/project/platforms/android folder
That will launch your application in the Android emulator
No comments:
Post a Comment