Run AVD Emulator without Android Studio

后端 未结 30 1880
不知归路
不知归路 2020-11-28 17:39

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

相关标签:
30条回答
  • 2020-11-28 17:43

    A Picture worth thousand words :)

    How to Start AVD from MAC terminal

    0 讨论(0)
  • 2020-11-28 17:46

    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

    0 讨论(0)
  • 2020-11-28 17:46

    On windows

    ......\Android\sdk\tools\bin\avdmanager list avds
    
    ......\Android\sdk\tools\emulator.exe -avd Nexus_5X_API_27
    
    0 讨论(0)
  • 2020-11-28 17:47

    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

    0 讨论(0)
  • 2020-11-28 17:47

    in 2019 , there might have some changes due to android studio update.

    1. open command prompt [ cmd ]
    2. 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 )

    1. check the list of emulators that you all ready created by

      emulator -list-avds

    2. copy your preferred emulator name.

    3. choose and run your emulator by

      emulator -avd < your preferred emulator name >

    4. done.

    0 讨论(0)
  • 2020-11-28 17:47
     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

    0 讨论(0)
提交回复
热议问题