Page 1 of 1

Android simulator produces graphic garble on screen

Posted: Tue Oct 12, 2021 4:18 pm
by SWEdeAndy
I've managed to setup Android Studio with api level 29 and stuff, and produced a working app deployed to a physical device (an old Galaxy 5, running Android 6).

But when I try to use virtual devices with Android 10, I get very strange graphic artefacts on screen (here a Pixel 3XL):
Screenshot_1634050378.png
This happens with a virtual Nexus 5 as well. The app works, but every card gets this smearing effect.

Is this a known effect in the Android Simulator (Android Studio 3.6.1, macOS 11.6 Big Sur), or am I to expect this happens on real devices too?

Re: Android simulator produces graphic garble on screen

Posted: Tue Oct 12, 2021 4:39 pm
by LCMark
@SWEdeAndy: Do you have acceleratedRendering enabled? If so, that will be the culprit - the problem doesn't occur on real devices. (FWIW, in LC10 we will be updating acceleratedRendering to use OpenGL ES 3.0+ on mobile - and IIRC, this does not show the problem).

Re: Android simulator produces graphic garble on screen

Posted: Tue Oct 12, 2021 4:46 pm
by SWEdeAndy
LCMark wrote:
Tue Oct 12, 2021 4:39 pm
Do you have acceleratedRendering enabled? If so, that will be the culprit - the problem doesn't occur on real devices.
Indeed, I do. :D
I'll make sure to set it to false when machine() includes "SDK", or something, then.

Thanks for the quick reply, Mark!

Re: Android simulator produces graphic garble on screen

Posted: Tue Oct 12, 2021 5:41 pm
by SWEdeAndy
Interestingly though, the simulator screen goes black the moment acceleratedRendering is turned off! :shock:

I even tried putting a button in that turns it off, to make sure the app loads correctly first (with acceleratedRendering on).
As soon as the button is clicked, the screen goes black.

I see now a number of tickets in QC about Android, acceleratedRendering and black screens. However, most seem to get the problem with acceleratedRendering turned on, while here it's the opposite (or, problems both ways actually)...

Anyway, if it doesn't happen on real devices then I'm happy and don't really need to dig deeper into this. Makes testing on virtual Androids quite annoying though. But that's Android for you - annoying... Way more so than iOS. :)