Failed to get package name from xx/xx/UE4Game-armv7.apk

Program.Main: AutomationTool terminated with exception:
Program.Main: Exception in Android.Automation: Failed to get package name from D:/UnrealEngine4/UnrealEngine-4.0\Engine\Binaries/Android\UE4Game-armv7.apk
Stacktrace: 在 AndroidPlatform.GetFinalObbName(String ApkName) 位置 d:\UnrealEngine4\UnrealEngine-4.0\Engine\Source\Programs\AutomationTool\Android\AndroidPlatform.Automation.cs:行号 61
在 AndroidPlatform.GetDeviceObbName(String ApkName) 位置 d:\UnrealEngine4\UnrealEngine-4.0\Engine\Source\Programs\AutomationTool\Android\AndroidPlatform.Automation.cs:行号 86
在 AndroidPlatform.Deploy(ProjectParams Params, DeploymentContext SC) 位置 d:\UnrealEngine4\UnrealEngine-4.0\Engine\Source\Programs\AutomationTool\Android\AndroidPlatform.Automation.cs:行号 186
在 Project.Deploy(ProjectParams Params) 位置 d:\UnrealEngine4\UnrealEngine-4.0\Engine\Source\Programs\AutomationTool\Scripts\DeployCommand.Automation.cs:行号 53
在 BuildCookRun.DoBuildCookRun(ProjectParams Params) 位置 d:\UnrealEngine4\UnrealEngine-4.0\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:行号 240
在 BuildCommand.Execute() 位置 d:\UnrealEngine4\UnrealEngine-4.0\Engine\Source\Programs\AutomationTool\BuildCommand.cs:行号 37
在 AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) 位置 d:\UnrealEngine4\UnrealEngine-4.0\Engine\Source\Programs\AutomationTool\Automation.cs:行号 357
在 AutomationTool.Automation.Process(String[] CommandLine) 位置 d:\UnrealEngine4\UnrealEngine-4.0\Engine\Source\Programs\AutomationTool\Automation.cs:行号 325
在 AutomationTool.Program.MainProc(Object Param) 位置 d:\UnrealEngine4\UnrealEngine-4.0\Engine\Source\Programs\AutomationTool\Program.cs:行号 88
在 AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param) 位置 d:\UnrealEngine4\UnrealEngine-4.0\Engine\Source\Programs\AutomationTool\Utils.cs:行号 568
在 AutomationTool.Program.Main() 位置 d:\UnrealEngine4\UnrealEngine-4.0\Engine\Source\Programs\AutomationTool\Program.cs:行号 48
Program.Main: Failed to get package name from D:/UnrealEngine4/UnrealEngine-4.0\Engine\Binaries/Android\UE4Game-armv7.apk

Did you build the android binaries?

You should have UE4Game-armv7.apk file in the specified path (Engine/Binaries/Android/) otherwise you will get the error.

Check No android build option? answer details about how to rebuild the engine.

Then you set your solution configuration to ‘Development’ (not -Editor) and solution platform to ‘Android’ in Visual Studio to build the .apk.

Hello Kenshin,

Sorry for the delay in responding. It looks as though you’re trying to package for Android? If so make sure you’ve read through our documentation:

Getting Started: Setting Up Unreal Engine Projects for Android Development | Unreal Engine 5.1 Documentation

Launching/Packaging: Launching Unreal Engine Projects on Devices | Unreal Engine 5.1 Documentation

Also make sure your device is on the list of our currently supported devices: Android Support for Unreal Engine | Unreal Engine 5.1 Documentation

If you are still experiencing issues packaging for Android, let me know!

-Max B.

Hello,

Thank you for your report. We were not able to investigate this on the engine version you reported, but there have been many version changes to UE4 since this question was first posted. With a new version of the Engine comes new fixes and it is possible that this issue has changed or may no longer occur. Due to timetable of when this issue was first posted, we are marking this post as resolved for tracking purposes. If you are still experiencing the issue you reported in the current engine version, then please respond to this message with additional information and we will investigate as soon as possible. If you are experiencing a similar, but different issue at this time, could you please submit a new report for it.

Thanks!

thank you