Package ERROR: AutomationTool terminated with exception: System.Exception: Couldn't update resource

When I want to package my project, I get the following error:

Program.Main: ERROR: AutomationTool terminated with exception: System.Exception: Couldn’t update resource

bei ModuleResourceUpdate.SetData(Int32 ResourceId, ResourceType Type, Byte[] Data)

bei ModuleResourceUpdate.SetIcons(Int32 ResourceId, GroupIconResource GroupIcon)

bei UnrealBuildTool.BaseWindowsDeploy.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy)

bei BaseWinPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)

bei Project.Package(ProjectParams Params, Int32 WorkingCL)

bei BuildCookRun.DoBuildCookRun(ProjectParams Params)

bei BuildCookRun.ExecuteBuild()

bei AutomationTool.BuildCommand.Execute()

bei AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands)

bei AutomationTool.Automation.Process(String[] Arguments)

bei AutomationTool.Program.MainProc(Object Param)

bei AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)

bei AutomationTool.Program.Main()

Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
BUILD FAILED
PackagingResults:Error: Error Unknown Error

Ok I fixed it by myself.
I deleted the Saved and Intermediate folder in my project folder and packaged it again.

You just fix my problem too!!!,

When I delete these folders, they get recreated whe I open the engine. What should I do then?

Using a bad .ico file as the game icon can also throw this error. In that case, just change the game icon back to the default ue4 image.