Application Error and Different APK Sizes with Same Parameters using RunUAT.exe vs. Unreal Editor in UE 4.27.2

Hi everyone,

I’m encountering an issue with Unreal Engine 4.27.2 where the APK size differs significantly depending on whether I use RunUAT.exe manually or through the Unreal Editor, even though I’m using the same parameters for both processes. It also makes the application can’t be run with the result from RunUAT.exe

Details

  • Unreal Engine Version: 4.27.2
  • Issue 1: Different APK sizes when using RunUAT.exe vs. Unreal Editor
    • APK Size (RunUAT.exe): 60MB
    • APK Size (Unreal Editor): 120MB
  • Issue 2: RunUAT.exe builds result in an error on launch
    • Error: “Failed to open descriptor file …/…/…/[ProjectName]/[ProjectName].uproject”

Steps to Reproduce

  1. Manual Build (RunUAT.exe):
  • Command: RunUAT.bat BuildCookRun -project="C:\Path\To\YourProject.uproject" -noP4 -clientconfig=Shipping -serverconfig=Shipping -platform=Android -targetplatform=Android -cookflavor=Multi -build -cook -stage -pak -archive -archivedirectory="C:\Path\To\Output"
  • Resulting APK Size: 60MB and the application runtime error
  1. Build through Unreal Editor:
  • Using the same parameter but it generated by the editor’s packaging settings (Android-Multi).
  • Resulting APK Size: 120MB

Observations

  • Both logs indicate similar processes, including cooking, packaging, and using the same plugins and compression methods.
  • Despite similar steps, there is a significant difference in the resulting APK sizes.
  • The APK built using RunUAT.exe results in an error on launch: “Failed to open descriptor file …/…/…/Unreal4SampleApp/Unreal4SampleApp.uproject”.

Error Image

Steps Taken

  • Verified that all plugins and assets are included and configured similarly.
  • Ensured that the same build configuration (Shipping) and target platform (Android) are used.
  • Compared the extracted contents of both APKs but didn’t find significant differences.

Request

Has anyone else encountered a similar issue? If so, how did you resolve it? Any insights or suggestions would be greatly appreciated. I’m looking to achieve consistent APK sizes between manual and editor builds and resolve the launch error when using RunUAT.exe.

Thank you!