Run AVD Emulator without Android Studio

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

    You can make a batch file, that will open your emulator directly without opening Android Studio. If you are using Windows:

    • Open Notepad

    • New file

    • Copy the next lines into your file:

      C:/
      cd C:\Users\%username%\AppData\Local\Android\sdk\tools
      emulator @[YOUR_EMULATOR_DEVICE_NAME]
      

      Notes:

      • Replace [YOUR_EMULATOR_DEVICE_NAME] with the device name you created in emulator

      • To get the device name go to: C:\Users\%username%\AppData\Local\Android\sdk\tools

      • Run cmd and type: emulator -list-avds

      • Copy the device name and paste it in the batch file

    • Save the file as emulator.bat and close

    • Now double click on emulator.bat and you got the emulator running!

提交回复
热议问题