How to package game with one file larger than 2 GB for Android?

I have already turned on “Allow large OBB files”, “Allow patch OBB file” and “Allow overflow OBB files”. If I turn on “Package game data inside .apk?”, the packaging fails with the following error:

UATHelper: Packaging (Android (ASTC)): FAILURE: Build failed with an exception.
UATHelper: Packaging (Android (ASTC)): 69 actionable tasks: 5 executed, 64 up-to-date
UATHelper: Packaging (Android (ASTC)): * What went wrong:
UATHelper: Packaging (Android (ASTC)): Execution failed for task ':app:compressReleaseAssets'.
UATHelper: Packaging (Android (ASTC)): > A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction
UATHelper: Packaging (Android (ASTC)):    > Required array size too large
UATHelper: Packaging (Android (ASTC)): * Try:
UATHelper: Packaging (Android (ASTC)): > Run with --stacktrace option to get the stack trace.
UATHelper: Packaging (Android (ASTC)): > Run with --info or --debug option to get more log output.
UATHelper: Packaging (Android (ASTC)): > Run with --scan to get full insights.
UATHelper: Packaging (Android (ASTC)): > Get more help at https://help.gradle.org.
UATHelper: Packaging (Android (ASTC)): BUILD FAILED in 22s

If I turn off “Package game data inside .apk?”, the game is packaged but freezes on splash screen after launch on the phone. How to fix this?

Greetings @Etyuhibosecyu

Did you resolve the issue for the Android? If not, I’d be happy to take a look! Let me know.

Hello @FrostyJas! Yes, if the topic is deleted then it does not worth since it is resolved trivially. I just haven’t checked that “Allow overflow OBB files” had been actually enabled in the config file. Turning this flag off and again on, with “Package game data inside .apk?” turned off, solved the problem.

Oh, I see! I’m glad you got it resolved!