안드로이드 에뮬레이터 실행방법
how to launch android emulator on powershell windows
You can launch an Android emulator on PowerShell in Windows using the emulator
command-line tool, which is part of the Android SDK.
Here's how:
Navigate to the Android SDK's
emulator
directory. This is typically located inC:\Users\[YourUserName]\AppData\Local\Android\Sdk\emulator
. You can use thecd
command in PowerShell to change directories.For example: PowerShellcd C:\Users\[YourUserName]\AppData\Local\Android\Sdk\emulator
(Replace
[YourUserName]
with your actual Windows username).List your available Android Virtual Devices (AVDs) to know the name of the emulator you want to launch. You can do this with the command:
PowerShell.\emulator.exe -list-avds
Launch the emulator by specifying the AVD name. Use the following command, replacing
[AVD_Name]
with the actual name of the AVD you got from the previous step:PowerShell.\emulator.exe -avd [AVD_Name]
For example, if your AVD is named
Pixel_6_API_33
, the command would be:PowerShell.\emulator.exe -avd Pixel_6_API_33
Optional: Add Emulator to PATH
To avoid navigating to the emulator
directory every time, you can add it to your system's PATH environment variable.
- Search for "environment variables" in the Windows search bar and select "Edit the system environment variables".
- In the System Properties window, click
the "Environment Variables..." button. - Under "System variables",
find the variable named "Path" and select it. Click "Edit...". - Click "New" and add the path to your Android SDK's
emulator
directory (e.g.,C:\Users\[YourUserName]\AppData\Local\Android\Sdk\emulator
). - Click "OK" on all open windows to save the changes.
- You might need to restart PowerShell or your computer for the changes to take effect.
Once the emulator directory is in your PATH, you can launch an emulator from any directory in PowerShell using:
emulator -avd [AVD_Name]