How to run Android Virtual Device in WebStorm


Finally, with the help of "Martin Zeitler", I succeeded in doing this in the following way:

In webstorm select File>settings, in search bar type "External Tools" select "External Tools", in "tools" section click on plus icon (add) fill this window like my parameter:

Name: android avd
*as you like

Program: C:\Users(your user name)\AppData\Local\Android\Sdk\emulator\emulator.exe
*this is your emulator.exe address and this is the default address, you have to replace (your user name) with your system user name or change the address for locating to your emulator.exe address

Arguments: -avd Nexus_5X_API_23
*Nexus_5X_API_23 is a sample you have to type your emulator name that you create it before in android studio

Working directory: C:\Users(your user name)\AppData\Local\Android\Sdk\emulator
*like Program address but without emulator.exe

click ok

now in webstorm in tools menu in External Tools section you can find android avd or your custom name. by click on it you can run your emulator from webstorm.

finally you don't need android studio at all , you can run it from webstorm.

it might be easier to explain with a screenshot ...

except that for Windows™ you'd have to use a .bat batch script, instead of .sh shell script

IDE screenshot

the shell script, which is being used in the example, can be found here.

it does a little more than just start the emulator and is for Linux only.

(just to provide an idea, what can be done in the given situation).

here it is explained: Start the emulator from the command line.