Android build fails when distribution is checked

When I build with out distribution checked it compiles out fine. I can install and run it on my nvidia shield tablet and it runs great. When I check distribution, it fails every time. I have tried many versions of engine, added a keystore file. I still get same error of it not being able to find some kind of file it seems but I have no idea what because it doesn’t actually tell you what file that is. I assume this is something simple as it does run great with out distribution checked. Any help would be appreciated. I have included what it says, if you need more information let me know.

MainFrameActions: Packaging (Android (DXT)): BUILD SUCCESSFUL
MainFrameActions: Packaging (Android (DXT)): Total time: 44 seconds
MainFrameActions: Packaging (Android (DXT)): Running: C:\NVPACK\jdk1.6.0_45/bin/jarsigner.exe -sigalg SHA1withRSA -digestalg SHA1 -storepass kronotrgr -keystore “C:\Users\Steve\MasterOfMarbles.keystore” “C:\Users\Steve\Documents\Unreal Projects\Marble\Intermediate/Android/APK/bin/Marble-release-unsi
MainFrameActions: Packaging (Android (DXT)): gned.apk” masterofmarbles
MainFrameActions: Packaging (Android (DXT)): Running: C:\NVPACK\android-sdk-windows/tools/zipalign.exe 4 “C:\Users\Steve\Documents\Unreal Projects\Marble\Intermediate/Android/APK/bin/Marble-release-unsigned.apk” “C:\Users\Steve\Documents\Unreal Projects\Marble\Binaries/Android/Marble-Android-Shippin
MainFrameActions: Packaging (Android (DXT)): g.apk”
MainFrameActions: Packaging (Android (DXT)): BuildCommand.Execute: ERROR: BUILD FAILED
MainFrameActions: Packaging (Android (DXT)): Program.Main: ERROR: AutomationTool terminated with exception:
MainFrameActions: Packaging (Android (DXT)): Program.Main: ERROR: Exception in System: system cannot find file specified
MainFrameActions: Packaging (Android (DXT)): Stacktrace: at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
MainFrameActions: Packaging (Android (DXT)): at UnrealBuildTool.Android.UEDeployAndroid.SignApk(String ConfigFilePat
MainFrameActions: Packaging (Android (DXT)): h, String SourceApk, String DestApk)
MainFrameActions: Packaging (Android (DXT)): at UnrealBuildTool.Android.UEDeployAndroid.MakeApk(String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks)
MainFrameActions: Packaging (Android (DXT)): at UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy(String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor)
MainFrameActions: Packaging (Android (DXT)): at AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
MainFrameActions: Packaging (Android (DXT)): at Project.Package(ProjectParams Params, Int32 WorkingCL)
MainFrameActions: Packaging (Android (DXT)): at BuildCookRun.DoBuildCookRun(ProjectParams Params)
MainFrameActions: Packaging (Android (DXT)): at BuildCommand.Execute()
MainFrameActions: Packaging (Android (DXT)): at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands)
MainFrameActions: Packaging (Android (DXT)): at AutomationTool.Automation.Process(String[] CommandLine)
MainFrameActions: Packaging (Android (DXT)): at AutomationTool.Program.MainProc(Object Param)
MainFrameActions: Packaging (Android (DXT)): at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
MainFrameActions: Packaging (Android (DXT)): at AutomationTool.Program.Main()
MainFrameActions: Packaging (Android (DXT)): Program.Main: ERROR: system cannot find file specified
MainFrameActions: Packaging (Android (DXT)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
MainFrameActions: Packaging (Android (DXT)): Program.Main: AutomationTool exiting with ExitCode=1
MainFrameActions: Packaging (Android (DXT)): Domain_ProcessExit
MainFrameActions: Packaging (Android (DXT)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
MainFrameActions: Packaging (Android (DXT)): copying UAT log files…
MainFrameActions: Packaging (Android (DXT)): RunUAT.bat ERROR: AutomationTool was unable to run successfully.
MainFrameActions: Packaging (Android (DXT)): BUILD FAILED

Howdy SteveFox1620,

Thank you for reporting this issue. I am going to need a bit more information from you before I dig into this issue. Would you be able to attach your DXdiag and your project log files to this thread?

I have attempted to repro this issue by loading up a new project in 4.4.3 and check on Distribution box, but project was able to package successfully. Is there a step by step way that I may be able to repro this issue so I can see error on my end? What version of UE4 are you using and is that build binary or source?

Any additional information would be greatly appreciated.

Thanks and have a great day!

I get this same error on every version of editor including latest 4.5 preview since 4.2. I get same error on both binary and two different source builds I tried. Builds fine and runs great with out distribution checked, but I can’t put it on google play store like that.
log file is 9.45 meg so I zipped it. It would not allow me to upload a 7z file. I think its something simple as it’s same error over and over with every version of engine I use. I can’t figure it out though.

Windows 32 with out distribution - Works
Windows 32 with distribution - Works
Android with out distribution - Works
Android with distribution - Fails

link text

Hey SteveFox1620,

Can you make sure “tools/zipalign.exe” Is present in directory pointed to by ANDROID_HOME envirnonment variable. It is only used for distribution so that may be it. It is called in UnrealBuildTool.Android.UEDeployAndroid.SignApk().

Thanks!

FIXED
Thank you. That was indeed problem. I copied zipalign.exe from C:\NVPACK\android-sdk-windows\build-tools\20 to C:\NVPACK\android-sdk-windows\tools and it finished with no errors.

Glad to hear that problem was fixed for you. Have a great day!

Having same problem, but copying zipalign doesn’t work for me :frowning:

Howdy piXelicidio,

I just wanted to check in with you and see if this is same issue that you have solved on your other posts before i mark this as resolved.

Thanks and have a great day!

Howdy Steve and piXel,

Just wanted to check in with both of you and see if this issue is still occurring. I got an update saying that there was a new message to this issue but I am unable to see any comment here.

Please be sure to let me know when you get chance so that I may be able to further investigate if needed.

Thanks and have a great day!

I accidentally responded on wrong issue. This has been resolved. I deleted comment as soon as I realized I had posted in wrong area, sorry.

No worries! Just wanted to check.

Thanks!

Having a Distribution Failed issue here, but this fix does not work for me?

Still can’t get a Shipping/Distribution to work I’m having same problem. I think it has to do with game now being put into a folder UE4Game.

So even when you’re able to build a “For Distribution” / Shipping game it will not work from app store or installing it locally. For now you’re stuck with a non Distribution / Shipping game

I’m having exact same problem

Working:

Build configuration: Shipping

Full rebuild

Not Working:

Build configuration: Shipping

Full rebuild

For Distribution

-

A full shipping for distribution build will give error:

Failed to open descriptor file

Hi ,

Failed to open descriptor file is a common error caused by many things. Do you have your Google Play keystore setup?

Hi ,

We will be tracking issues you are experiencing on post that you made:

Please refrain from posting your issue on multiple threads on AnswerHub. We will address issue on your post. Make sure you include any logs you can, as requested by wittlief.