Run AVD Emulator without Android Studio

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

提交回复
热议问题