Bug Issue: Black screen and crashes on Android 11

Pages: 1


  • Subscriber - Stencyl Studio
  • *
April 14, 2021, 12:09:33 pm
Games published with the newest Stencyl builds show a black screen and crash at scene switch on devices running Android 11 (while it seems older builds work - for example b10616)

More info in this forum post http://community.stencyl.com/index.php/topic,61644.0.html
« Last Edit: April 14, 2021, 12:18:59 pm by FMStudioGameDev »

Issue updated by Justin - April 14, 2021, 04:58:22 pm
  • Tags added: 4.1.0


  • Master Stencyler
  • *
April 16, 2021, 04:41:17 pm
The investigation so far:
- If you just change the target to API level 29, the crash seems to goes away.
- Google is still accepting API level 29 games until August, so that should give us a bit of time to figure out the actual problem.
(Big thanks to FMStudio and gcarne for taking time to help me look into this!)

Problems with targeting API 29:
Stencyl currently forces API level 30 for Android games. This is due to #1771: Android Device Huawei P20 Letterboxing. When a display cutout is present, it may push the game screen around. It's possible for display cutouts to be on any of the four edges of the screen.

When we target API 29, we can only keep the game screen in-place when cutouts are on the short edge of the screen, but the above bug will show up again if a cutout is present on the long edge.

If we target API 30, we can keep the game screen in-place, regardless of whether a cutout is present on a short edge or a long edge, and the game screen is never pushed out of the way.

For now, force the use of API 29. In Stencyl, you can use this code in Settings > Advanced > OpenFL Settings.
Code: [Select]
<section if="android">
    <android target-sdk-version="29" />

If a player has a device with a display cutout on the long edge, it can push the game screen a little bit, but this is a lot better than crashes.
« Last Edit: April 16, 2021, 04:44:48 pm by Justin »


  • Junior Stencyler
April 20, 2021, 01:09:59 am
I'm not sure if I'm doing this wrong but I seem to have the same black screen. I have hand written the code into stencyl as copy and pate will not work but looks correct to me. I left the api as 30 as when I click it to 29 it will not test and still get the black screen. sound is playing so no crash but no picture.

I added a picture to the side. not sure if it should go there, sorry in advance  :)

« Last Edit: April 20, 2021, 04:09:35 am by 2wasted2 »

New attachment added by 2wasted2 - April 20, 2021, 01:11:20 am


  • Junior Stencyler
April 20, 2021, 04:11:30 am
Ok please ignore my last message...
Figured it out,
Seems I can not spell   :o
Dam dyslexia!!!  >:(

Thanks again Justin, live saver!!!


  • Subscriber - Stencyl Studio
  • *
July 20, 2021, 10:57:19 am
Is it okay to still target API 29 given that August is coming up?


  • Master Stencyler
  • *
August 02, 2021, 03:54:54 am
The root cause of this isn't solved yet, but a workaround is available to keep the behavior from before API 30. That workaround is applied in Stencyl 4.1.0-beta3, b10791.


The underlying issues will need to be fixed to prevent crashes on future MTE-enable android devices.


  • Master Stencyler
  • *
August 03, 2021, 12:38:37 am
Of course, don't forget to delete the changes you made to Settings > Advanced > OpenFL Settings. Otherwise you'll end up with a game google won't accept, since they only accept games targeted for API 30 now.

Pages: 1


  • Reported
    April 14, 2021, 12:09:33 pm
  • Updated
    August 03, 2021, 12:38:37 am

  • View Status
  • Type
  • Status
  • Priority
  • Version
  • Fixed in
  • Assigned to
  • Category



* Screenshot (2).png (108.5 kB, 1584x832 - viewed 529 times.)