is there a way to run the emulator without starting the Android Studio first. Perhaps from the command line. I know that this feature was available in older versions and has
A Picture worth thousand words :)
How to Start AVD from MAC terminal
Assuming you've got Android Studio installed, and SDK in your PATH, it's:
emulator -avd avd_name
To get a list of AVD names, run:
emulator -list-avds
Source: https://developer.android.com/studio/run/emulator-commandline.html
On windows
......\Android\sdk\tools\bin\avdmanager list avds
......\Android\sdk\tools\emulator.exe -avd Nexus_5X_API_27
I am working with a React Native project and I also faced this problem
I solved it by making a .bat file in my desktop that I can open fast
The content of the .bat is
C:\Users\haria\AppData\Local\Android\sdk\emulator\emulator -avd Pixel_2_XL_API_27
Where haria is my Windows username and Pixel_2_XL_API_27 is my emulator name
If you want to see your emulator name, open CMD (or PowerShell) and type (In Windows)
cd C:\Users\haria\AppData\Local\Android\sdk\emulator
Then to see the emulator(s) name
./emulator -list-avds
in 2019 , there might have some changes due to android studio update.
change directory to sdk > tools
cd C:\Users\Intel\AppData\Local\Android\sdk\tools
if that address is not working 2.a open android studio 2.b open Gradle Scripts directory ( if you have a open project inside android studio, you can easily find in left side of the screen. ) 2.c double click on local properties ( at the very bottom ) 2.d you should see the address right away, ( sdk dir ) 2.e change your directory to that address in command prompt ( like cd AppData ) 2.f change directory again to tools ( cd tools )
check the list of emulators that you all ready created by
emulator -list-avds
copy your preferred emulator name.
choose and run your emulator by
emulator -avd < your preferred emulator name >
done.
Update 2020/05: Windows 10
first get a list of emulators, open cmd and run :
cd %homepath%\AppData\Local\Android\Sdk\emulator
then
emulator -list-avds
next create a shortcut of emulator.exe
found in the directory above, then change the properties in it by editing the Target:
text box like this
emulator.exe @YourDevice