32

I have an issue all of a sudden where I am getting a weird black flickering at the bottom of the screen (as shown in the video below). I had no problem earlier also this happened after I removed android emulator and rechecked it (Reinstalled it ) under the setting “Tools” ->” SDK Manager” -> “SDK Tools” tab.

Video Link - https://vimeo.com/manage/videos/739329236

Computer Specs - I7 - 10750h, Nvidia 1650 Ti - 4GB, 16 GB Ram, 1 TB SSD (443 GB free)

Also, I have noticed the screen goes most of the part blank when I am not touching the screen. enter image description here

Stars Tracker
  • 762
  • 1
  • 10
  • 24

8 Answers8

47

I had a same issue in my new laptop. I have fixed it by changing one parameter in the emulator's config file.

  • Go to C:\Users\USER_NAME\.android\avd\Pixel_5_API_31.avd}}
  • Edit the config.ini file.
  • Find the hw.gpu.mode = auto and change it to the hw.gpu.mode = guest and save the changes.
  • Restart the emulator.
Joaquin Iurchuk
  • 5,499
  • 2
  • 48
  • 64
Srikar Uppu
  • 471
  • 2
  • 4
  • 3
    Solved the problem for me on an Intel GPU too (i7-12700H). But instead of "guest" i took "angle_indirect" as i am on windows, which should be a bit better as it is not purely in software inside the guest but also using DirectX. It should have similar performance to "auto" or "host", but without the rendering problems. – timoxd7 Mar 05 '23 at 10:58
  • I was using Android API_30, on my Windows10, and this answer worked for me. thanx – MishkuMoss Jun 21 '23 at 05:38
  • 1
    I was using API level 31 before. Some answers suggested to use API level 30. But after installing, I was getting same flicker issue. So, I tried @Srikar Uppu 's answer and it worked just fine for me – Satyam Raj Jun 29 '23 at 08:37
9

I had the same problem recently after create a emulator with API level 33, Then I've tried to used API level 31 and emulator works normally.

Ali Tran
  • 91
  • 3
  • Ok thanks for letting me know I think maybe its a bug for API 33. – Stars Tracker Aug 16 '22 at 10:29
  • 1
    Same problem here but API 31 (and 32) also flickers for me. All of these are x86_64 but it works if I go back to API 30 that is x86. The operating system goes from nice and modern Android to a UI that looks like it's from 2002 but the graphics are smooth, fast and doesn't flicker :) – mikeesouth Aug 23 '22 at 11:22
  • This is not working for me even on API level 31 or even 30 – Satyam Raj Jun 29 '23 at 08:31
8

I tried giving more memory (4096 RAM) to my emulator and the issue disappeared.

More ram for android emulator

Bruno Bieri
  • 9,724
  • 11
  • 63
  • 92
DangCao1999
  • 116
  • 1
  • 4
7

I just installed Android Studio first time for a while and noticed the flickering problem right away. I have NVIDIA GPU which most likely contributes into this problem. In the AVD options inside the Android Studio device manager I tried switching the Graphics setting from automatic to "Software GLES 2.0" and it fixed the flickering. No way using software acceleration is optimal in any way but it could be a workaround until the root cause is fixed.

EDIT: found the issue posted about this behavior confirming it is a GPU driver related issue https://issuetracker.google.com/issues/246917660

SariH
  • 71
  • 1
  • 2
4

It seems there is a problem with the x86_64 images. If Software GLESS is turned on then the flicker goes away but the graphics are little laggy. x86 images works well smooth but out-dated.

Suman De
  • 41
  • 2
0

Same here. After one of the latest Emulator (in SDK tools) updates virtual device with API level 31 or above show same issues. Devices with API level 30 or below work fine. Tried to completely clean and re-install Studio and Video drivers. No effect. So since it started right after update i believe it's Emulator component issue.

  • You can leave your comment as a reply/comment within the question and not as a standalone answer. – KBog Sep 16 '22 at 01:37
0

I just switched to a Pixel 5 with API 33 and it seems to have resolved my flickering problem..

roflcopter1101
  • 283
  • 1
  • 6
  • 20
0

if you have Intel GPU and GeForce GPU. You should launch emulator with Intel GPU because this problem is related to the GeForce driver. You can try these steps. This solved my problem:

  1. Copy emulator path: C:\Users\YOUR_PROFILE\AppData\Local\Android\Sdk\emulator\qemu\windows-x86_64
  2. (for windows 11) Start/Settings/System/Display/Grafics
  3. Find option "add application" and click Browse.
  4. Paste emulator path and select "qemu-system-x86_64" then Ok
  5. Then select this app and click Parameters and choose GPU Intel(energy saving)
  6. Save settings and launch emulator
  • Why/how "black flickering" is related to GeForce driver? – edixon Aug 20 '23 at 14:36
  • I don't know but this issue described here https://issuetracker.google.com/issues/246917660 – Mikhail Aug 21 '23 at 07:14
  • You're right, the issue is **described** there but it **doesn't say** it is related to the GeForce driver. Also, "when this one makes problems use another one" is not really a solution, does it? – edixon Aug 21 '23 at 15:31
  • may be, but when I launch emulator with my Intel GPU - it work for me and some people too – Mikhail Aug 22 '23 at 11:28