Android Studio Emulator Crashes

  1. To avoid crashes and hangs caused by not having enough free disk space, the emulator checks for sufficient free disk space on startup, and will not start unless at least 2 GB is free. If the emulator fails to start for you, check to see that you have adequate free disk space.
  2. In the Emulated Performance section open the dropdown for Graphics. Change it from Automatic to Software. Hit the Finish button to save new setting and try starting the emulator again.
  3. There is an issue with Android Emulator with Visual Studio 2019 as well as Android Studio, that whenever trying to open the emulator the windows crashes and enters BSOD (Status: “clock watchdog timeout”). This issue has started after a patch update for windows (KB4554354 (OS Build )). Troubleshooting done so far.

The default emulator has a lot of compatibility issues and generally shows errors whenever you try to run an application. Even I faced the same problem last winter. First of all you have to make sure there are no bugs in the code. Once you are confident that your code is correct, the best solutions are. I have been practicing java coding using Android Studio for a while now, and I have been having issues with running my app. At first, when I run the app, it says GPU driver problem. I couldn't fix that, and switched to using different emulators. I installed both Nox app player and Bluestacks.

I have a laptop that I mainly use for android development on android studio, today all of the sudden got this error message (or an outdated version of it) when i ran my emulator

Updated the geforce driver, but no use, tried to update the intel one but failed, is there a way to disable this? bypass the compatibility renderer and work as I used to, the emulator is awful now. Any explanation why that occurred all of the sudden?

Also I’m using windows 7 64-bit if that will help with anything, had an update few days ago.

Answers:

I am using Win10 but have the same problem. Emulator started crashing my app after last emulator update. In my case, problem is that emulator does not run on hardware even though I never had a problem with my GPUs. Also, the “GPU driver issue” window that pops up doesn’t even label WHICH one of the GPUs it thinks is the problem.

For me the solution that worked is to run emulator from terminal, forcing it to run using hardware graphics (instead of letting emulator decide on which) using command

where mode is host so that it will run with hardware.

For example:

Using Android Studio terminal move to folder where the emulator is located. Default on Win10 is: C:UsersuserNameAppDataLocalAndroidsdkemulator

Find emulator to run by listing available ones:
emulator -list-avds

Run emulator with -gpu host option:
emulator -avd avd_name -gpu host

More info on this link

Answers:

A comment in the on the bug report pertaining to this issue by a Google employee is illuminating.

If your system doesn’t have a discrete GPU, we intended this change in
order to make the emulator more reliably run on Intel GPU drivers. At
your own risk, you may switch back to using the Intel GPU by going to
settings page, then changing the OpenGL ES renderer to “ANGLE
(D3D11)”, “ANGLE (D3D9)”, or “Desktop native OpenGL”.

It appears that this message is being displayed for all systems using Intel GPUs, not just systems running specific versions of a graphics driver.

The solution is to, if possible, switch to using an external GPU for running the emulator.

If an Intel GPU is the only GPU available on system it is possible to re-enable accelerated rendering of OpenGL ES, by overriding the default OpenGL ES renderer in settings (see below). Options are OpenGL, ANGLE and SwiftShader. SwiftShader is CPU based OpenGL ES emulation, so this setting will not provide a speedup. ANGLE is Direct3d based OpenGL emulation.

As per the comment this is not guaranteed to work, indeed I am able to re-enable hardware acceleration for Android 7 emulators, but with hardware acceleration enabled, all I receive is a black screen for Android 8 emulators.

Open settings with Ctrl-Shift-S then Settings -> General -> OpenGL ES renderer

Update #1:
Another comment on the bug report provides further illumination on this issue:

If you have just a Intel HD 4xxx running the emulator, it’s intended that a compatibility renderer be used. I’m sorry about it, but we need to be able to switch to better-supported Intel GPU drivers especially when running high API levels (25+) of system images. Intel iGPUs of that generation (and older) have many issues with OpenGL compatibility.

It appears that Intel iGPU drivers for Haswell (4th gen) processor and older don’t support OpenGL well enough for Android 7.1+ devices. So they are purposely falling back to using software emulation which better supports the new Android emulators.

This matches my experience. Using the Intel iGPU works great on Android 7, but is flaky on Android 7.1 and doesn’t work at all on Android 8.

My suggestion, stick with Android 7 emulators when using hardware acceleration for Intel Haswell and older iGPUs.

Update #2:
Official communication on this issue was finally provided in the form of comments in the release notes for Emulator 26.1.3:

Which GPUs will be switched to use ANGLE or Swiftshader rendering is determined as follows:

  • Older Intel iGPUs have driver issues on both OpenGL and ANGLE D3D drivers. Users with Intel HD Graphics 3xxx and older will use Swiftshader.
  • Some users reported the inability to use API level 25 images because of a bug in which “Pixel Launcher keeps stopping.” This seems to be a driver issue in some Intel HD 4xxx models. So they will be switched to use ANGLE automatically.

For best results with GPU emulation, we recommend either to use a discrete NVIDIA or AMD GPU, or a newer Intel GPU (Iris, HD 5xxx, HD 5xx/6xx).

Answers:

I ran into this problem today. Per the suggestion from the Google emulator issue tracker, I installed the beta emulator 26.1.3. Problem fixed.

Answers:

I did the same thing as @Api, but I did it from the Virtual Device Manager. In the device edit window, in the Graphics dropdown list, I selected “Hardware – GLES 2.0”. I believe the default is Automatic. I still get the erroneous GPU Driver popup window, but the emulator does not crash anymore. It is back to normal reliability.

Answers:

As other suggested, go to Settings -> Appearance & Behaviour -> System settings -> Updates. Change “Automatically check updates for” to “Beta channel”. Update emulator to latest beta. Driver issue should be gone. I had problems running fragment with google maps (app chrash) that was solved after update of emulator to latest beta.

Answers:

For linux users, go to Android Folder which in my case is under ~/Android. Then proceed to /sdk/emulator. “emulator” is a local command. So, you can run the command as local “./emulator”.

Android Studio Emulator Freezes

The rest is done as the user “Api” stated.

Android Studio Emulator Crashes Video

$ ./emulator -avd -avd_name -gpu mode

$ ./emulator -avd Nexus_5X_API_26 -gpu host (#IN MY CASE)

Note: I didn’t download SDK, instead copy and pasted it under /home dir. That’s why the command was not valid on a global scale. If you setup sdk avd from ground-up, it should work just fine.

Answers:

I’m having the exact same issue from precisely 4 days ago. I’ve tried both above answers but none of it work.
PS. The emulator works, but just crashes seemingly at random. I prior to this error, the emulator worked fine and i could test certain features, i can also debug completely with no crashes via USB with a few android devices so im almost certain its a problem with the emulator.

Edit: Not sure what eactly the problem was, but was solved by forcing Android Studio to run with nVidia GPU.

Answers:

Thanks, Lee, AlfaSpider, GPU Driver Issue problem solved following your instructions: use SDK manager, go to Settings -> Appearance & Behaviour -> System settings -> Updates. Change “Automatically check updates for” to “Beta channel”. Update emulator to latest beta. Driver issue should be gone.

Android Studio Emulator Crashes Windows 7

Android

The first time clicked “Check updates”, it prompted that my Android STUDIO installed is the latest version; after a while I clicked again, it starts to download. After the installation, problem disappeared—-it is working now thanks! 🙂

Tags: android