Android 14, SDK 34, Black screen on startup

Hey, so It packaged with no errors.
As shown in your solution, I added the RECEIVER_EXPORTED in the GameActivity.java.template file and added android.content.Context.RECEIVER_EXPORTED in all of the other [NAME]Receiver.java files and the DownloaderService.java file.

Also changed the billing libary version to 7.0.0

Still the same issue. My s23 get’s a black screen, the s8 launches fine.

Do I have to copy and paste all of the lines you wrote?

Because I’m just adding the RECEIVER_EXPORTED flags into the registerReceiver functions/commands.

And I also found another forum post on a similar solution.
Specifically this one where u made the last reply redirecting people to this thread:

In the reply marked as the Solution, the poster gives point that the registerReceiver get’s executed only in non-shipping builds because of the ! in the the if (!BuildConfiguration.equals(“Shipping”)) check.

So my assumption is that I have to copy and paste your full solution with the SDK checks instead of the buildConfiguration checks, as they should trigger the registerReceiver thing into the final .APK/.AAB, regardless of the build configuration.
(I thought the structure of your registerReceiver function was different because you used UE5)

Also I am now using CompileSDK 33, not 34, as 34 gave me errors and 33 still has the RECEIVER_EXPORTED stuff.

Please correct me if I’m wrong.

Yes, the RECEIVER_EXPORTED flag is available from SDK 33, that’s why I was checking against running device OS BUILD Version SDK >= Tiramisu
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU)

If you still have the issue, please try connecting the device through USB and collect logs from logcat/AndroidStudio. It should give a better understanding of the crash root cause. I did the same to identify billing client v6.0.0 causing crash on SDK 34 device, as that doesn’t use RECEIVER_EXPORTED flag until v7.0.0.

1 Like

Hey, so i did replace the lines and added the imports, probably exactly as written.

But I found out that I was rebuilding the solutions in DebugGameEditor, which is obviously wrong. I was also suspecting something because it rebuilt everything in like 2-3 seconds.

But when I try to rebuild to Shipping, Development or something else, i get these errors (they happen somewhere during or after the 11th module build):

|Error|LNK1181|cannot open input file ‘E:\UE_4.27\Engine\Plugins\Online\Android\OnlineSubsystemGooglePlay\Intermediate\Build\Win64\UE4Editor\Development\OnlineSubsystemGooglePlay\UE4Editor-OnlineSubsystemGooglePlay.lib’

|Error|MSB3073|The command E:\UE_4.27\Engine\Build\BatchFiles\Rebuild.bat ezREMAKEEditor Win64 Development -Project=D:\Misc\Unreal projects\ezREMAKE\ezREMAKE.uproject -WaitMutex -FromMsBuild exited with code -1.|ezREMAKE|C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets|51||

Looked online, some people said to add the plugin enabled:true in the .uproject file,
some others said to add the plugin into the Public and Private DependencyModuleNames.Add commands, but those didn’t help.

Do I need to use VS2022 or could I be missing some component in the VS instalation?

I’m using Visual studio 2019. (16.11.34).

Apologies if this is getting tiresome, I proceed one step and have to deal with something else like this, it just keeps happening.

Would you mind if we took this conversation to Discord or any other messaging platform?
If you aren’t too busy with other facets of life that is.

I could then post a solution here if it works out.

I’m not sure, VS2022 will help in this problem. However, I’m on it (VS2022)
Perhaps, something is different in UE4.
I’m on UE 5.3.2 and I’m always using shipping / android configuration to build all the changes mentioned earlier.
My build tools for android is 34.0.0 and Java compile SDK is set as android-33.

I’m sorry, I don’t have other info to help you on UE4 at this time.
However, you can chat with me on discord @ ‘rushatgames’

Thanks,

1 Like

All good.

I’ll try on my own and browsing other sides of the internet for solutions.

If I run into more issues related to this thread, I’ll add you in discord.

Thanks for all of the other replies.

1 Like

if issue is after publishing to play store (black screen or loading screen)
and only for android 14
this plugin might help
https://www.unrealengine.com/marketplace/en-US/product/play-services-play-asset-delivery

For anyone else on this thread looking for a solution, this might be it.

This has been supposedly fixed in 5.4.4
I haven’t tried it since I’m not working on my project anymore and I don’t like UE5 in general.

At 0:24 It is mentioned that for all new apps, you must update to 5.4.4 which includes android 14 compatibility fixes with SDK 34.

Hope this helps.