How to run the emulator from the windows command line?

2

How can I run the Android Emulator without having to open Android Studio? the command:

  

android avd

does not work.

When I use the command:

  

emulator -avd nexus5

I get this error message:

    
asked by anonymous 09.05.2017 / 14:17

3 answers

1

To run a command line emulator, use the following command:

emulator -avd avd_name [ {-option [value]} … ]

For example, if you have an emulator named Nexus_5X_API_25_x86 the following command will launch it.

emulator -avd Nexus_5X_API_25_x86

To list the names of existing emulators use the

emulator -list-avds

The commands must be executed within the folder where emulator.exe is located, by default in

C:\Users\NomeDoUtilizador\AppData\Local\Android\sdk\tools>

C:\Users\NomeDoUtilizador\AppData\Local\Android\sdk\tools\emulator -avd Nexus_5X_API_25_x86
C:\Users\NomeDoUtilizador\AppData\Local\Android\sdk\tools\emulator -list-avds
    
09.05.2017 / 14:34
0

I had a problem with Linux:

  

emulator: command not found (command not found)

How can this solution help someone I'm putting here.

Enter the location of the Android SDK folder in your example machine / home / user / android / sdk / tool run the same command, but starting with . / " thus:

./emulator -avd Nexus_5X_API_25_x86
    
02.11.2018 / 04:45
-1

At the Linux terminal, type:

emu -avd NomeDoEmulador
    
21.09.2018 / 06:51