I have multiple emulators provided by Android Studio. I have a Pixel 3 and a Pixel 4 both running Android api 30. Both work fine for a while, but eventually there is this popup:
After this point, the emulator becomes unusable. Notice that the home and back buttons at the bottom of the screen are gone. The emulator glitches horribly, with animations slowing down and leaving residue on the screen.
What I have tried
Quitting the emulator application and turning it back on again. Same issue again.
Pressing the emulator power button and restarting the emulator like I would a physical device. Same issue.
Deleting the emulator and creating new one. This works for a while but eventually the error happens again.
I followed the advice here: Android emulator error: "System UI has stopped" The .ini file had no entry for hw.mainKeys so I tried adding it. No effect.
Stats
MacBook Pro (16-inch, 2019)
processor: 2.6 GHz 6-Core Intel Core i7
memory: 16 GB 2667 MHz DDR4
graphics: AMD Radeon Pro 5300M 4 GB, Intel UHD Graphics 630 1536 MB
Android studio 4.4.1
At this point, it's becoming difficult to continue development, since I have to keep recreating my emulator and reinitializing the device data that I need for testing.