The cause was that the path to emulator had changed, so don't use ...../Android/Sdk/tools/emulator
but instead ....../Android/Sdk/emulator/emulator
.
Android emulator Error: PANIC: Missing emulator engine program for 'x86' CPU.
Issue
On macOS Catalina 10.15.5, Android Studio 4.1.2, I try to start the emulator from the command line.
% ~/Library/Android/sdk/tools/emulator -list-avds
Pixel_XL_API_30
% ~/Library/Android/sdk/tools/emulator -avd Pixel_XL_API_30
PANIC: Missing emulator engine program for 'x86' CPU.
But I get an error saying PANIC: Missing emulator engine program for 'x86' CPU.
Solution
Refer to the User guide: Start the emulator from the command line.
% ~/Library/Android/sdk/emulator/emulator -avd Pixel_XL_API_30
You can set the environment variable through your user settings in the operating system, for example, in your .bashrc
file on Linux, or .zshrc
on macOS.
export PATH="$HOME/Library/Android/sdk/emulator:$PATH"
Restart the terminal, or after running source ~/.zshrc
, just use emulator
directly.
% emulator -avd Pixel_XL_API_30