I am stuck a whole afternoon trying to run again my small Android/Kotlin application in Android Studio. The message pasted on this question topic suddenly nocked me down.
I had the same error as yours. I fixed it by updating everything in Android Studio, including the SDKs. After that, I wipe the data on my emulator and run the program. It works like a charm, hopefully you can fix yours, too.
1. emulator -list-avds
2. adb start-server
3. emulator -avd <avd_name>
if you see
PANIC: Missing emulator engine program for 'x86' CPU.
then you can try
1. emulator -list-avds
2. adb start-server
3. $ANDROID_HOME/emulator/emulator @name_device
for cold boot use flags
-no-snapshot
and -no-snapshot-load
This is likely caused by insufficient permissions. Run Android Studio or your command prompt (whichever you prefer) as an administrator and that should solve your problem.
Please also check the PATH defined in environment variables is correct. Open Command Prompt Type ECHO %PATH% and press Enter Key Check the path displayed on the screen
If the PATH is not correct, correct the same in Start - env - Environment Variables - Path