lefnire
lefnire

Reputation: 2664

cordova emulate - selecting an Android Virtual Device

I've got a few AVDs defined for testing on various API levels, 10-19. When I run cordova emulate android, it says:

WARNING : no emulator specified, defaulting to {ITEM ON THE TOP}

It selects the target AVD at the top of the list, whatever that might be. As a result, I've been deleting all AVDs and re-creating a new one when I need to test a new device. I can't find any flags for cordova emulate for selecting an AVD, is there such a flag? Or is there a way to specify a default AVD?

Upvotes: 9

Views: 7649

Answers (1)

lefnire
lefnire

Reputation: 2664

cordova emulate --target={AVD_NAME} android.

For some reason I thought that --target meant the Android version target (eg, 4.0.3) and would thus create an ad hoc AVD. Don't know why I thought that. But anyway, --target is the name/ID of your AVD.

Upvotes: 21

Related Questions