UE4 Android “Unknown Cook Failure / ExitCode=1” – FIX

:white_check_mark: UE4 Android “Unknown Cook Failure / ExitCode=1” – FIX

Problem
UE4 Android packaging fails with:

Unknown Cook Failure
ExitCode=1
DoesPackageExist FAILED
Component class is not set

Even after:

  • Migrating maps

  • Deleting demo content

  • Cleaning Intermediate/Saved folders

Cause
The Default Pawn (or actor spawned at BeginPlay) fails to spawn due to:

  • Collision at spawn

  • Broken / missing plugin components

  • Hidden references UE4 still validates during cook

UE4 Commandlet treats spawn failure as fatal during cook.


:bullseye: WORKING FIX (surprisingly simple)

Set the pawn spawn handling method to:

AdjustIfPossibleButDontSpawnIfColliding -> trytoAsjustLocation

Where to change it:

  • PlayerStart → Spawn Collision Handling
    OR

  • In Blueprint spawn node → Collision Handling Override
    OR

  • In GameMode Default Pawn spawn logic


:white_check_mark: Why this works

  • UE4 no longer forces a failed spawn

  • Broken or missing components are not instantiated

  • Cook validation passes

  • Android packaging succeeds

This fixes cases where:

  • Migration didn’t help

  • Broken plugin references exist

  • Pawn looks fine in PIE but fails in cook