Run AVD Emulator without Android Studio

后端 未结 30 1881
不知归路
不知归路 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:50

    Try this

    1. Complete Video tutorials (For all windows versions)

    OR

    2. Text tutorials

    • Open the command prompt and change the directory where your sdk is placed D:\Softwares\Android\sdk\tools\bin>

    • now add your avdmanager in this,now your full code is D:\Softwares\Android\sdk\tools\bin>avdmanager list avd

    • it will show you a list of emulator device that you have already created after few seconds

    • now typecd..

    • and run your emulator with this cmd, Here my emulator name is Tablet_API_25 so I have typed this name after the -avd.

      D:\Softwares\Android\sdk\tools>emulator -avd Tablet_API_25

    EDIT : For Android Studio 3.2 or later, the path changes to D:\Softwares\Android\sdk\emulator\emulator -avd Tablet_API_25

    i.e. %ANDROID_HOME%\tools\emulator -avd [AVD NAME]

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

    On MacOS

    First list down the installed emulators

    ~/Library/Android/sdk/tools/emulator -list-avds
    

    then run an emulator

    ~/Library/Android/sdk/tools/emulator -avd Nexus_5X_API_27
    
    0 讨论(0)
  • 2020-11-28 17:53

    I already have the Studio installed. But without starting (not installing) the Android Studio you can directly start the emulator with

    C:\Users\YOURUSERNAME\AppData\Local\Android\Sdk\tools\emulator.exe -netdelay none -netspeed full -avd YOUR_AVD_NAME

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

    This is the commands on Mac

    cd ~/Library/Android/Sdk/tools/bin && ./avdmanager list avd
    

    then

    cd ~/Library/Android/Sdk/tools && ./emulator -avd NAME_OF_YOUR_DEVICE
    
    0 讨论(0)
  • 2020-11-28 17:53
    1. Just create a .bat file. Call it smth like "run pixel 2.bat"
    2. Open it with editor like Notepad++
    3. Write 2 lines of code
    cd C:\Users\mxsof\AppData\Local\Android\Sdk\emulator 
    emulator -avd pixel_2_api_29
    
    1. Launch it.

    That's all. Happy coding!

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

    to list the emulators you have

    ~/Library/Android/sdk/tools/emulator -list-avds
    

    for example, I have this Nexus_5X_API_24

    so the command to run that emulator is

    cd ~/Library/Android/Sdk/tools && ./emulator -avd Nexus_5X_API_24
    
    0 讨论(0)
提交回复
热议问题