Download

Unable to package for Android (ALL)

Hello,

I can’t build for Android.

After installing/uninstalling everything again and again I still couldn’t build for Android a basic c++ empty project. Not sure what to do next, I searched everywhere for an answer. Here’s the logged error:


Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): C:\Program Files (x86)\Epic Games\4.13\Engine\Binaries\DotNET\UnrealBuildTool.exe AndroidFinal Android Development -Project="C:\Users\Cristian\Documents\Unreal Projects\AndroidFina
l\AndroidFinal.uproject"  "C:\Users\Cristian\Documents\Unreal Projects\AndroidFinal\AndroidFinal.uproject"  -remoteini="C:\Users\Cristian\Documents\Unreal Projects\AndroidFinal" -noxge -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2016.09.16-13.09.54.txt' 
UATHelper: Packaging (Android (All)):    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Packaging (Android (All)):    at AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Packaging (Android (All)):    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
UATHelper: Packaging (Android (All)):    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, FileReference Project, String Target, String Platform, String Config, String AdditionalArgs, String LogName, Dictionary`2 EnvVars)
UATHelper: Packaging (Android (All)):    at AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary`2 EnvVars)
UATHelper: Packaging (Android (All)):    at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable`1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary`2 PlatformEnvVars, Nullable`1 InChangelistNumberOverride, Dictionar
y`2 InTargetToManifest)
UATHelper: Packaging (Android (All)):    at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask)
UATHelper: Packaging (Android (All)):    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
UATHelper: Packaging (Android (All)):    at AutomationTool.BuildCommand.Execute()
UATHelper: Packaging (Android (All)):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
UATHelper: Packaging (Android (All)):    at AutomationTool.Automation.Process(String] Arguments)
UATHelper: Packaging (Android (All)):    at AutomationTool.Program.MainProc(Object Param)
UATHelper: Packaging (Android (All)):    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
UATHelper: Packaging (Android (All)):    at AutomationTool.Program.Main()
UATHelper: Packaging (Android (All)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Android (All)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

Any help would be appreciated. I tried with 4.10, 4.12.5 and 4.13 (the latest version of the engine). Nothing seems to work.

Cheers,
cristian

There isn’t enough information in the part of the log you posted to determine the issue; usually the cause is above the actual ERROR line. Asking on AnswerHub and attaching the full log would be the best way to get help.

I have just compiled a project straight from the template (VR) for Gear …and I get the same result…!!!

Have no idea how to fix it…

ok fixed it… went through all the “Plugins” and removed everything I don’t use…

then it compiled…

Sorry cant be anymore helpful than that…

Ok, thanks for the answer. I will ask in there as well. For the record, this is the rest of the logs:

UATHelper: Packaging (Android (All)): UnrealBuildTool: [dex] Pre-Dexing C:\Users\Cristian\Documents\Unreal Projects\GA_Android\Intermediate\Android\APK\JavaLibs\downloader_library\bin\classes.jar -> classes-cb925e00ee9ae6d5be4bde78aa701b5c.jar
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at java.lang.ClassLoader.defineClass1(Native Method)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at java.security.AccessController.doPrivileged(Native Method)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
UATHelper: Packaging (Android (All)): UnrealBuildTool: [dx] Exception in thread “main”
UATHelper: Packaging (Android (All)): UnrealBuildTool:
UATHelper: Packaging (Android (All)): UnrealBuildTool: BUILD FAILED
UATHelper: Packaging (Android (All)): UnrealBuildTool: C:\NVPACK\android-sdk-windows ools\ant\build.xml:888: The following error occurred while executing this line:
UATHelper: Packaging (Android (All)): UnrealBuildTool: C:\NVPACK\android-sdk-windows ools\ant\build.xml:890: The following error occurred while executing this line:
UATHelper: Packaging (Android (All)): UnrealBuildTool: C:\NVPACK\android-sdk-windows ools\ant\build.xml:902: The following error occurred while executing this line:
UATHelper: Packaging (Android (All)): UnrealBuildTool: C:\NVPACK\android-sdk-windows ools\ant\build.xml:283: null returned: 1
UATHelper: Packaging (Android (All)): UnrealBuildTool:
UATHelper: Packaging (Android (All)): UnrealBuildTool: Total time: 28 seconds
UATHelper: Packaging (Android (All)): UnrealBuildTool: UnrealBuildTool Exception: System.IO.FileNotFoundException: Could not find file ‘C:\Users\Cristian\Documents\Unreal Projects\GA_Android\Intermediate/Android/APK/bin/GA_Android-debug.apk’.
UATHelper: Packaging (Android (All)): UnrealBuildTool: File name: ‘C:\Users\Cristian\Documents\Unreal Projects\GA_Android\Intermediate/Android/APK/bin/GA_Android-debug.apk’
UATHelper: Packaging (Android (All)): UnrealBuildTool: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
UATHelper: Packaging (Android (All)): UnrealBuildTool: at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
UATHelper: Packaging (Android (All)): UnrealBuildTool: at UnrealBuildTool.UEDeployAndroid.MakeApk(AndroidToolChain ToolChain, String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk)
UATHelper: Packaging (Android (All)): UnrealBuildTool: at UnrealBuildTool.UEDeployAndroid.PrepTargetForDeployment(UEBuildTarget InTarget)
UATHelper: Packaging (Android (All)): UnrealBuildTool: at UnrealBuildTool.UnrealBuildTool.DoPostStartupStuffThatCanAccessConfigs(String] Arguments)
UATHelper: Packaging (Android (All)): CommandUtils.Run: Run: Took 87.101982s to run UnrealBuildTool.exe, ExitCode=5

I fixed by downgrading the Android SDK base, platform and build tools to the versions here Mac // Android packagement error: Unsupported major.minor version 52.0 - UE4 AnswerHub