Android 5.2.1 Build works on Binary, but not Source

Hello, I am trying to package a build for Android on 5.2.1.

I messed with SDK settings for 3 days, until I realized that was not the problem.

If I use the exact same settings on a binary project, I can build Android fine, but when I use the same settings on a source engine build, I get an error when gradle makes the .apk

(I also clear Binaries, Build, Intermediate, DerivedDataCache, and Saved folders every time, so its not that either.)

FAILURE: Build failed with an exception.
UATHelper: Packaging (Android (ASTC)): * What went wrong:
UATHelper: Packaging (Android (ASTC)): 59 actionable tasks: 5 executed, 54 up-to-date
UATHelper: Packaging (Android (ASTC)): Execution failed for task ':app:packageDebug'.
UATHelper: Packaging (Android (ASTC)): > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
UATHelper: Packaging (Android (ASTC)):    > java.lang.OutOfMemoryError (no error message)
UATHelper: Packaging (Android (ASTC)): * Try:
UATHelper: Packaging (Android (ASTC)): Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. 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 18s
UATHelper: Packaging (Android (ASTC)): ERROR: cmd.exe failed with args /c "V:\Virtuoso2023\Virtuoso\Intermediate\Android\arm64\gradle\rungradle.bat" :app:assembleDebug
UATHelper: Packaging (Android (ASTC)):        (see U:\Source\UE5Git\UnrealEngine\Engine\Programs\AutomationTool\Saved\Logs\Log.txt for full exception trace)
UATHelper: Packaging (Android (ASTC)): AutomationTool executed for 0h 1m 53s
UATHelper: Packaging (Android (ASTC)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (ASTC)): BUILD FAILED

This happens even on a blank project, so out of memory is not referring to file sizes or .obb limits, etc.

It happens no matter what. If I open the same project in Binary and build, it works. Therefore it appears to be a problem with 5.2.1 source specifically. As of now, I cannot build my primary app to Android or Quest.

Any advice would be greatly appreciated. Thank you

I tried this again today and it worked. Nothing changed. Maybe I restarted my PC or something and it fixed it.

I’m happy! ¯_(ツ)_/¯

1 Like

Hi can I ask you the configuration you using for android. Is this good ? Packaging get success for me but it’s getting closed on launch image

Can I know your android studio setup ?

Sorry, I was out of town. Here it is:

1 Like

Yeah this is good. I am asking Android Studio’s one

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.