Warning: emulator not specified, defaults to "avd_name"

I want to run an emulator to test my project. I created three AVDs named Nexus , Xperia and Grand . Then in Node Js I entered the cordova run android --emulator . After the assembly is successfully completed, this message. WARNING : no emulator specified, defaulting to Grand . And then the emulator starts with Grand.

My question is, how can I set the default AVD name? For example, now I want to install Xperia or Nexus by default. I know that this should be very simple, but I tried to find many posts, I can’t even find the right answer to my question.

+7
android emulator avd cordova
source share
1 answer

cordova "run" - will try to run it on a real device if it does not find it back in the "emulator", and it chooses the default value because you did not specify anything.

Perhaps you can still pass the "--target" flag to it, and it will return to the specified emulator name.

 cordova run --target=name_of_your_emulator android 

Or, if you intend to test the emulator, use the "emulate" option instead of the "run" option

 cordova emulate --target=name_of_your_emulator android 
+20
source share

All Articles