Failed to start Cordova emulator

I am trying to use an android emulator to install an application on it.

Unfortunately, the emulator never starts up. I am using the following commands in my cordova project:

cordova emulate android

      

The last output I get from the console is:

Waiting for emulator...

      

But the emulator never starts (I waited 45 minutes).

All path variables are set correctly and I can start the emulator using Eclipse studio or Android, but not using the command from cordova.

Any hints?

+3


source to share


4 answers


If you can start the emulator through android studio then how to work around, start the emulator from outside and run the command

cordova run android

      



It will deploy your application to an already running emulator.

+3


source


Check emulator path settings https://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_index.md.html If this cannot be done, do: use alternative shell interface:

$ /path/to/project/cordova/run --emulator

      

Instead of relying on which emulator is currently included in the SDK, you can reference each one by the names you specify:



$ /path/to/project/cordova/run --target=NAME

      

Check the above documentation and see if your computer supports virtualization or not.

0


source


I was getting the same problem, I solved it:

Open Android Device Manager, click on window -> Android Virtual Device Manager

There you will see a list of all Android Android devices, if you see any device with an upgradeable icon on it, just click "Recover" and then try. He works.

0


source


I had the same problem. Although cordova launched the emulator, the command line kept saying "Waiting for emulator ..." forever.

Trick before running the command:

Cordova launches android make sure you navigate to android platform folder. That is, do not run the command from

/project folder

      

but instead inside

/project/platforms/android folder

      

This will launch your application in the Android emulator

0


source







All Articles