Hi,
To fix the “Emulator command not recognized” error in Windows command line, follow these steps:
- Add Android SDK’s emulator location to your system PATH:
setx PATH "%PATH%;C:\Users\{username}\AppData\Local\Android\Sdk\emulator"
- Also add platform-tools to PATH:
setx PATH "%PATH%;C:\Users\{username}\AppData\Local\Android\Sdk\platform-tools"
- Close and reopen your command prompt, then verify the installation:
emulator -list-avds
If you still can’t run the emulator, you can use the full path:
C:\Users\{username}\AppData\Local\Android\Sdk\emulator\emulator -avd [device_name]
Alternative solution: Use Android Studio to launch emulators:
- Open Android Studio
- Click on “Tools” → “Device Manager”
- Click the play button next to your virtual device
Make sure you have:
- Android SDK installed
- At least one Android Virtual Device (AVD) created
- Android Studio or the command line tools installed properly
That’s it.