I've started react native programming recently, I use WebStorm for coding, I always have to run Android Studio and start my Android Virtual Device and then Close Android Studio and work with WebStorm and run and test my react native app.
how can I run my Android Virtual Device from webstorm without the need to open Android Studio?
No, WebStorm provides no Android support and there are no plugins you can use to run android virtual devices within Webstorm. Although you can run android emulator from terminal without using Android studio.
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.
Select Run menu and then select “ Run ‘app’ ” menu item. Android Studio will start Run the Project. Step 3. Android Studio will open “ Select Deployment Target ” dialog, and lists list of Available Virtual Devices to allow us to select the deployment Target for our Project.
I've started react native programming recently, I use WebStorm for coding, I always have to run Android Studio and start my Android Virtual Device and then Close Android Studio and work with WebStorm and run and test my react native app.
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
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.
solution
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With