Packaging Error 'Unable to find target 'UE4Game'

I’m getting a packaging error when selecting export to Windows x64 bit for my build. This is the message I get. Has anyone run into this before?


LogUObjectHash: Compacting FUObjectHashTables data took   3.63ms
UATHelper: Packaging (Windows (64-bit)): Running AutomationTool...
UATHelper: Packaging (Windows (64-bit)): Parsing command line: -ScriptsForProject=C:/Users/Brandon/Desktop/UE_Dartmouth_Library_2/UE_Dart_Library_2.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=C:/Users/Brandon/Desktop/UE_Dartmouth_Library_2/UE_Dart_Library_2.uproject -cook -stage -archive -archivedirectory=C:/Users/Brandon/Desk
top/GameTest -package -ue4exe=F:\Games\UE_4.24\Engine\Binaries\Win64\UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -target=UE4Game -clientconfig=Shipping -utf8output
UATHelper: Packaging (Windows (64-bit)): Setting up ProjectParams for C:\Users\Brandon\Desktop\UE_Dartmouth_Library_2\UE_Dart_Library_2.uproject
UATHelper: Packaging (Windows (64-bit)): UE_Dart_Library_2.uproject requires a temporary target.cs to be generated (SunPosition plugin is enabled)
UATHelper: Packaging (Windows (64-bit)): ERROR: Unable to find target 'UE4Game'
UATHelper: Packaging (Windows (64-bit)):        (see C:\Users\Brandon\AppData\Roaming\Unreal Engine\AutomationTool\Logs\F+Games+UE_4.24\Log.txt for full exception trace)
PackagingResults: Error: Unable to find target 'UE4Game'
UATHelper: Packaging (Windows (64-bit)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults: Error: Unknown Error

1 Like

Did you get this fixed ? Im having the same error also

1 Like

Hey it appears that when I migrate the level to a new project, it works! I think the error occurred because I copied my original game directory and then renamed the unreal engine project name. It was trying to find the old unreal engine project when packaging.

Hi!

  1. Close UnrealEngine.
  2. Find and delete the BaseEngine.ini and TargetInfo.json files in the project folder.
  3. Launch UnrealEngine

It helped me.

11 Likes

Thanks!

1 Like

unreal engine didnt start after doing this. i dont know why. i needed to restore the files after.

1 Like

same error. i tried a lot of things, none fixed it.

Anyone got resolved ?

It helped me too. Thanks)

Hey everyone.

Wasted a bunch of time on this but fixed it by recloning my project from github and now I can build. I realize this contributes nothing to finding the root cause of the error and this means nothing at all if your project is not stored on a repo but figured I would post the solution in case it helps anyone else.

i had the same problem and simply restarting my pc fixed it. I hadn’t restarted my pc after instaling all android related stuff (sdk jdk etc.), and it seems that was why this problem occured for me.

this helped me as well

Worked! Thank you so much.

Thank you so much.

It helped me too. ) Thank you!

I deleted all the folders in the project except:

config
Content
Plugins
Source

restarted the project and then the error went away when I tried to package.

For me I only had to remove the targetifo.json file from the project directory \Intermediate
I didnt find a baseengine.ini file

if your project path include ‘Programs’ !