Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: No emulator specified, defaulting to "avd_name"

I want to start the emulator to test my project. I created three AVD's named Nexus, Xperia, and Grand. Then, in the Node Js I entered the command cordova run android --emulator. After build successful its shows this message. WARNING : no emulator specified, defaulting to Grand. And then emulator starts with Grand.

My question is how I can set the default AVD name? Like, now I want to set the Xperia or Nexus to be default. I know it should be some simple thing to do, but I tried to search many posts even cant find the correct answer for my question.

like image 547
Yithirash Avatar asked May 28 '14 03:05

Yithirash


2 Answers

cordova "run" - will try to run it on a real device, if it's not found it fallback to "emulator" and it chooses the default because you didn't specified anything else.

Maybe you can still pass it the "--target" flag and it will fallback to the specified emulator name you created.

cordova run --target=name_of_your_emulator android

Or if you're intending to test on an emulator, then use the "emulate" instead of "run" option

cordova emulate --target=name_of_your_emulator android
like image 182
Ricky Levi Avatar answered Nov 15 '22 18:11

Ricky Levi


I had the same problem with 'WARNING : no emulator specified'. For everyone that need more help with this issue. Make sure you do following things:

  • You have a 'platform-tools' and 'tools' directory in your AppData
  • All requirements are installed. Check it with: "$ cordova requirements"
  • Your Android Studio is open
  • Your Android Virtual Device is booted and ready
  • you use the command '$ cordova run --emulator'

There are some things I did for troubleshooting:

  1. I created a new Device with Android 9 or 10
  2. I used 'Wipe Data' and 'Cold boot' in the android device itself

I hope that helps someone!

like image 44
Taranis Avatar answered Nov 15 '22 19:11

Taranis