Run AVD Emulator without Android Studio

后端 未结 30 1884
不知归路
不知归路 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 18:04

    Open your terminal and

    cd path_to/Android/Sdk/emulator
    

    And run the following to get the emulator name that you created before using android studio

    ./emulator -list-avds
    

    Replace $emulator_name with the one you want to launch and run

    ./emulator -avd $emulator_name
    
    0 讨论(0)
  • 2020-11-28 18:08
    cd C:\Users\{computer_user_name}\AppData\Local\Android\Sdk\emulator
    

    then run:

    ./emulator -list-avds
    or
    emulator -list-avds
    

    output:

    PIXEL_2_API_29
    PIXEL_2_XL_API_29
    

    then run:

    ./emulator -avd PIXEL_2_XL_API_29
    or
    emulator -avd PIXEL_2_XL_API_29
    

    That's it

    0 讨论(0)
  • 2020-11-28 18:08

    Got it working for Windows 10:

    C:\Users\UserName\AppData\Local\Android\Sdk\tools>emulator -list-avds
    Nexus_5X_API_28
    C:\Users\UserName\AppData\Local\Android\Sdk\emulator>emulator -avd Nexus_5X_API_28
    
    0 讨论(0)
  • 2020-11-28 18:09

    The way to run the emulator from the console (I assume that you installed it before, using Android Studio) is:

    run

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

    OR

    cd ~/Android/Sdk/tools && ./emulator -list-avds

    You will get the list od your virtual installed devices. In my case it was:

    Available Android Virtual Devices:
      Name: Galaxy_Nexus_API_17
      Device: Galaxy Nexus (Google)
      Path: /home/piotr/.android/avd/Galaxy_Nexus_API_17.avd
      Target: Google APIs (Google Inc.)
      Based on: Android 4.2 (Jelly Bean) Tag/ABI: google_apis/x86
      Skin: galaxy_nexus
      Sdcard: /home/piotr/.android/avd/Galaxy_Nexus_API_17.avd/sdcard.img
    

    Copy name of the device you want to run and then

    cd ~/Android/Sdk/tools && ./emulator -avd NAME_OF_YOUR_DEVICE

    in my case:

    cd ~/Android/Sdk/tools && ./emulator -avd Nexus_5X_API_23

    0 讨论(0)
  • 2020-11-28 18:09

    For Linux/Ubuntu

    Create a new File from Terminal as

    gedit emulator.sh (Use any Name for file here i have used "emulator")

    now write following lines in this file

    cd /home/userName/Android/Sdk/tools/

    ./emulator @your created Android device Name

    (here after @ write the name of your AVD e.g

    ./emulator @Nexus_5X_API_27 )

    Now save the file and run your emulator using following commands

    ./emulator.sh

    In case of Permission denied use following command before above command

    chmod +x emulator.sh

    All set Go..

    0 讨论(0)
  • 2020-11-28 18:09

    if you installed Git on your system. then you can run .sh bash code. I create the bash code for search from your created ADV Devices and list them. then you can select the number of adv device for run emulator without running Android studio.

    link: adv-emulator.sh

    note [windows os]: please first add %appdata%\..\Local\Android\Sdk\emulator to your system Environment path, otherwise the bash-code not work.

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