I faced a strange issue today when developing an android app.
emulator: setWindowSurfaceColorBuffer: bad window surface handle 0x5 emulator: fb::flushwindowsurfacecolorbuffer: window handle 0x9 not found
These errors started appearing in Event Log window and app build started failing. After long hours of searching the Internet for it, Wiping data from the simulator seem to be the only solution that works.
Tools Menu -> AVD Manager
Choose the dropdown under action column of the device which you’re using and select Wipe Data.