Stars Tracker
Stars Tracker

Reputation: 921

Android Studio Avd emulator shows a black flickering

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

Upvotes: 47

Views: 31309

Answers (8)

Mikhail
Mikhail

Reputation: 21

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

Upvotes: 2

Srikar Uppu
Srikar Uppu

Reputation: 791

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.

Upvotes: 79

DangCao1999
DangCao1999

Reputation: 176

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

More ram for android emulator

Upvotes: 14

roflcopter1101
roflcopter1101

Reputation: 333

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

Upvotes: 1

SariH
SariH

Reputation: 91

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

Upvotes: 9

Suman De
Suman De

Reputation: 41

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.

Upvotes: 4

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.

Upvotes: 0

Ali Tran
Ali Tran

Reputation: 101

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.

Upvotes: 10

Related Questions