Black Screen on first launch on Android with publish build with obb
Build Type: Binary
Build version: 4.18.1-3754814+++UE4+Release-4.18
Description of the issue: Black screen appears after splash screen on first launch on Android with only with publish/distribution build with obb file included.
Action 1 Create empty project (Blueprint or C++), mobile, scalable, no extras stuff
Action 2 Create UMG and add there image background and button
Action 3 Create empty level and create previous widget during begin play and add to viewport
Action 4 Set that level as Default Map
Action 4 Set build to publish with ticked Full Rebuild and Distribution
Action 5 Create keystore file, copy it to Build/Android and set same values in Distribution Signing section in UE4
Action 6 Set SDKs versions 21 or higher in Android section and NDK version 21 or higher in Android SDK section
Action 7 Package Android Multi and upload to phone
Action 8 Run app, and on first time you can see Black Screen
Action 9 Secondary runs work as usual on most phones
Issue occurs 100% of the time for me with these steps, even if you play around turning on and off plugins, physics or graphical settings ticks. Only ticking on Package game data inside .apk? removed problem, but is unusable for me. Tested on: ASUS Zenfone AR android 7.0, Huawei P8 Lite android 6.0, and Samsung J5 android 6.0.1. Where Samsung was only one of those 3 devices where black screen continued to be on even on secondary and following runs.
System Specs: Windows 10.
Software: Codeworks 1.6u1 version with default setting, except with Android Support Repository, which was updated to 47 (because CodeWorks does not save its license properly by default) and used Gradle.
Keytool params: keytool -genkey -v -keystore MyGame.keystore -alias MyGame -storepass MyGame -validity 9999
Logcat message: 2719 8835 I WindowManager: Destroying surface Surface(name=com.Subatomic.Keemiku_Kaardid/com.Subatomic.Keemiku_Kaardid.DownloaderActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2014 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:881 com.android.server.wm.WindowState.removeLocked:1460 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2535 com.android.server.wm.WindowManagerService.removeWindowLocked:2493 com.android.server.wm.WindowManagerService.removeWindowLocked:2362 com.android.server.wm.WindowManagerService.removeWindow:2349 com.android.server.wm.Session.remove:193
608 639 E BufferQueueProducer: [SurfaceView - com.Subatomic.Keemiku_Kaardid/com.epicgames.ue4.GameActivity] connect: BufferQueue has been abandoned
12982 13008 E libEGL : eglCreateWindowSurface: native_window_api_connect (win=0xe2bee108) failed (0xffffffed) (already connected to another API?)
12982 13008 E libEGL : eglCreateWindowSurface:470 error 3003 (EGL_BAD_ALLOC)
12982 13008 E libEGL : validate_display:99 error 3008 (EGL_BAD_DISPLAY)
I've managed to work past the crash I was experiencing, apparently it was a bug and not something I was doing incorrectly so I had to grab the latest version of 4.18 source to bypass it. After doing so, I'm not running into the issue you're mentioning. As it could be due to the changes made since the last official 4.18 release, can you try getting the latest 4.18 from Github to see if you still experience the same issue?
In case you don't usually use Github, please keep in mind that this page will 404 if you are not logged into an account that is linked to your Epic account. To get the latest, you'll want to either use the link provided to go to the right branch or select "4.18" from the branches list.
Follow this question
Once you sign in you will be able to subscribe for any updates here