How to run the emulator from the windows command line?

Asked

Viewed 10,056 times

2

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

android Avd

doesn’t work.

When I use the command :

Emulator -Avd nexus5

I get this error message: inserir a descrição da imagem aqui

3 answers

3


To run an emulator via command line 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 command

emulator -list-avds

Commands must be executed inside the folder where the Emulator.exe, by default in

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

or use the full path to the Emulator.exe

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
  • I get this error: [6892]:ERROR:. /android/Qt/qt_setup.cpp:28:Qt library not found at .. Emulator lib64 Qt lib Could not Launch '.. Emulator/qemu/windows-x86_64/qemu-system-x86_64.exe': No such file or directory

  • What folder is the Emulator.exe?

  • I was able to execute, just insert the path : path/to/Sdk/Emulator -use-system-libs -Avd [AVD-NAME]

2

I had a problem with Linux:

Emulator: command not found (command not found)

how this solution can help someone I’m putting here.

enter the location of the Android SDK folder on your example machine /home/user/android/sdk/tool execute the same command, only starting with "./" being like this:

./emulator -avd Nexus_5X_API_25_x86

-1

On the Linux terminal, type:

emu -avd NomeDoEmulador

Browser other questions tagged

You are not signed in. Login or sign up in order to post.