Unknown Error : Can't package any builds

I’ve installed UE for the first time on my PC. As per many tutorials online, I went ahead and installed:

  • Codeworks (tegra)
  • My phone’s specific USB driver
  • And got my phone’s Oculus Sig
  • Visual Studio 2015

However, once I try to package for Android ETC2, or any other platform for that matter, I get the following errors on the Output Log:

UATHelper: Packaging (Android (ETC2)): Running AutomationTool...
UATHelper: Packaging (Android (ETC2)): Automation.ParseCommandLine: Parsing command line: -ScriptsForProject=Z:/VR/REAL_ESTATE/demo/apk/source/Zintax_Cardboard_2-2/Zintax_Cardboard/Zintax_Cardboard.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=Z:/VR/REAL_ESTATE/demo/apk/source/Zintax_Cardboard_2-2/Zintax_Cardboard/Zintax_Cardboa
rd.uproject -cook -stage -archive -archivedirectory=Z:/VR/REAL_ESTATE/demo/apk/source/Zintax_Cardboard_2-2/Zintax_Cardboard -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -compressed -pak -prereqs -nodebuginfo -targetplatform=Android -cookflavor=ETC2 -build -CrashReporter -utf8output
UATHelper: Packaging (Android (ETC2)): Automation.Process: Setting up command environment.
UATHelper: Packaging (Android (ETC2)): BuildCookRun.SetupParams: Setting up ProjectParams for Z:\VR\REAL_ESTATE\demo\apk\source\Zintax_Cardboard_2-2\Zintax_Cardboard\Zintax_Cardboard.uproject
UATHelper: Packaging (Android (ETC2)): Project.Build: ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Android (ETC2)): CommandUtils.Run: Run: C:\Program Files (x86)\Epic Games\4.14\Engine\Binaries\DotNET\UnrealBuildTool.exe Zintax_Cardboard Android Development -Project=Z:\VR\REAL_ESTATE\demo\apk\source\Zintax_Cardboard_2-2\Zintax_Cardboard\Zintax_Cardboard.uproject  Z:\VR\REAL_ESTATE\demo\apk\source\Zintax_Cardboard_2-2\Zintax_Cardboard
\Zintax_Cardboard.uproject  -remoteini="Z:\VR\REAL_ESTATE\demo\apk\source\Zintax_Cardboard_2-2\Zintax_Cardboard" -noxge -generatemanifest -NoHotReload
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: ERROR: System.IO.FileLoadException: Could not load file or assembly 'file:///Z:\VR\REAL_ESTATE\demo\apk\source\Zintax_Cardboard_2-2\Zintax_Cardboard\Intermediate\Build\BuildRules\Zintax_CardboardModuleRules.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: File name: 'file:///Z:\VR\REAL_ESTATE\demo\apk\source\Zintax_Cardboard_2-2\Zintax_Cardboard\Intermediate\Build\BuildRules\Zintax_CardboardModuleRules.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool:    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool:    at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool:    at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence assemblySecurity)
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool:    at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool:    at UnrealBuildTool.DynamicCompilation.CompileAssembly(FileReference OutputAssemblyPath, List`1 SourceFileNames, List`1 ReferencedAssembies, List`1 PreprocessorDefines, Boolean TreatWarningsAsErrors)
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool:    at UnrealBuildTool.DynamicCompilation.CompileAndLoadAssembly(FileReference OutputAssemblyPath, List`1 SourceFileNames, List`1 ReferencedAssembies, List`1 PreprocessorDefines, Boolean DoNotCompile, Boolean TreatWarningsAsErrors)
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool:    at UnrealBuildTool.RulesAssembly..ctor(IReadOnlyList`1 Plugins, List`1 ModuleFiles, List`1 TargetFiles, Dictionary`2 ModuleFileToPluginInfo, FileReference AssemblyFileName, RulesAssembly Parent)
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool:    at UnrealBuildTool.RulesCompiler.CreateProjectRulesAssembly(FileReference ProjectFileName)
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool:    at UnrealBuildTool.UEBuildTarget.CreateTarget(TargetDescriptor Desc)
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool:    at UnrealBuildTool.UnrealBuildTool.RunUBT(String[] Arguments, FileReference ProjectFile)
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: 
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: 
UATHelper: Packaging (Android (ETC2)): CommandUtils.Run: Run: Took 2.6550619s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Packaging (Android (ETC2)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): C:\Program Files (x86)\Epic Games\4.14\Engine\Binaries\DotNET\UnrealBuildTool.exe Zintax_Cardboard Android Development -Project=Z:\VR\REAL_ESTATE\demo\apk\source\Zintax_Cardboard_
2-2\Zintax_Cardboard\Zintax_Cardboard.uproject  Z:\VR\REAL_ESTATE\demo\apk\source\Zintax_Cardboard_2-2\Zintax_Cardboard\Zintax_Cardboard.uproject  -remoteini="Z:\VR\REAL_ESTATE\demo\apk\source\Zintax_Cardboard_2-2\Zintax_Cardboard" -noxge -generatemanifest -NoHotReload. See logfile for details: 'UnrealBuildTool-2017.01.11-13.16.29.txt' 
UATHelper: Packaging (Android (ETC2)):    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Packaging (Android (ETC2)):    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 (ETC2)):    at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary`2 EnvVars)
UATHelper: Packaging (Android (ETC2)):    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 (ETC2)):    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 (ETC2)):    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, Dictionary`2 InTargetToManifest)
UATHelper: Packaging (Android (ETC2)):    at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask)
UATHelper: Packaging (Android (ETC2)):    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
UATHelper: Packaging (Android (ETC2)):    at BuildCookRun.ExecuteBuild()
UATHelper: Packaging (Android (ETC2)):    at AutomationTool.BuildCommand.Execute()
UATHelper: Packaging (Android (ETC2)):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
UATHelper: Packaging (Android (ETC2)):    at AutomationTool.Automation.Process(String[] Arguments)
UATHelper: Packaging (Android (ETC2)):    at AutomationTool.Program.MainProc(Object Param)
UATHelper: Packaging (Android (ETC2)):    at AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
UATHelper: Packaging (Android (ETC2)):    at AutomationTool.Program.Main()
UATHelper: Packaging (Android (ETC2)): Program.Main: AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Android (ETC2)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

The only 2 error messages I see there are:

  1. UnrealBuildTool: ERROR: System.IO.FileLoadException: Could not load file or assembly …
  2. Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): …

Any thoughts? I have no idea where to start debugging this.

,

Please delete your Intermediate and Saved folders from your project folder. Once you’ve done that, try to package again. Please upload the full error output logs as a .txt file with your next reply if that doesn’t resolve all issues.

Thanks!

Sanity check: The quickstart doesn’t mention it (yet), but you need to install Java 8, not Java 7.

Installed Java SE 8 and deleted Intermediate & Saved folders, and still nothing.

So just to be sure:

  • I’m opening the project
  • I build lights and textures
  • Then when I click for any build, I get all sorts of errors.

The errors that stand out are:
UnrealBuildTool: ERROR: System.IO.FileLoadException: Could not load file or assembly ‘file:///Z:\VR\REAL_ESTATE\demo\apk\source\Zintax_Cardboard_2-2\Zintax_Cardboard\Intermediate\Build\BuildRules\Zintax_CardboardModuleRules.dll’ or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

UATHelper: Packaging (Android (ETC2)): Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): C:\Program Files (x86)\Epic Games\4.14\Engine\Binaries\DotNET\UnrealBuildTool.exe Zintax_Cardboard Android Development -Project=Z:\VR\REAL_ESTATE\demo\apk\source\Zintax_Cardboard_
2-2\Zintax_Cardboard\Zintax_Cardboard.uproject Z:\VR\REAL_ESTATE\demo\apk\source\Zintax_Cardboard_2-2\Zintax_Cardboard\Zintax_Cardboard.uproject -remoteini=“Z:\VR\REAL_ESTATE\demo\apk\source\Zintax_Cardboard_2-2\Zintax_Cardboard” -noxge -generatemanifest -NoHotReload. See logfile for details: ‘UnrealBuildTool-2017.01.19-18.16.14.txt’

I’m attaching screen shots for my packaging, Android, Android SDK, HTML5, and HTML5 SDK.

Thanks for your help guys!

I tried this. Nothing. Please view my reply to @

Hello @ , I’m attaching the error log.
[link text][1]

122872-error_log_01192017.txt (8.42 KB)

I don’t know if this is causing your specific error, but I believe your NDK and SDK need to be set to the same version. You have your sdk set to latest, but your ndk set to android-21. I would set your sdk to “matchndk” and try again.

@, I’ve seem to have made progress, but still the error is concentration on the Android builds.

  • I ran android.bat and installed all updates
  • I’m running Unreal Engine as an adminstrator
  • I’ve used matchndk

I’ve managed to build a Microsoft Standalone, however, when I try to build for android I get an Unknown error.

I noticed that the last error towards the end of the Output Log makes reference to a [UnrealBuildTool-2017.01.21-02.52.19.txt][1] file. And the last error line in that log file references an error on the ndk-build.cmd

==== Writing new GameActivity.java file to C ====
Preparing native code for debugging...
UnrealBuildTool Exception: ERROR: C://android-ndk-r12b/ndk-build.cmd failed with args APP_ABI="armeabi-v7a " NDK_DEBUG=1

(btw, any thoughts on why those slashes are backslashing?)

I ran that code on the Command Prompt (admin) and got the following error:

C:\Users\zinta\Documents\Unreal Projects\Zintax_Cardboard\Intermediate\Android\APK>C://android-ndk-r12b/ndk-build.cmd APP_ABI="armeabi-v7a " NDK_DEBUG=1
[armeabi-v7a] Gdbserver      : [arm-linux-androideabi-4.9] libs/armeabi-v7a/gdbserver
[armeabi-v7a] Gdbsetup       : libs/armeabi-v7a/gdb.setup
[armeabi-v7a] Install        : libUE4.so => libs/armeabi-v7a/libUE4.so
C://android-ndk-r12b/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-strip:./libs/armeabi-v7a/libUE4.so: File format not recognized
make: *** [libs/armeabi-v7a/libUE4.so] Error 1
make: *** Deleting file `libs/armeabi-v7a/libUE4.so'

Does this make more sense @ ? A little help here…

123014-unrealbuildtool-2017.01.21-02.52.19.txt (5.43 KB)

I’ve continued tweaking this.

In order to setup the Project Wizard… I followed these steps: General Mobile Development for Unreal Engine | Unreal Engine 5.1 Documentation

I’ve added the APK and DLC, run the APK, and now I get another set of errors, which I’ve attached [here][1]

The problem seems to revolve around the android sdk or the ndk. HELP!!!

123018-projectlauncher.log (2.2 KB)

I noticed some of your original paths are on “Z:” – is that a physical or a network ?

Thanks for replying.

That was a network , but i’ve moved everything local. First, because one of the builds complained about the path being too long and next because it did cross my mind that this could be an issue.

Update:
I created a range of versions by upping the target version of the SDK to 24 and leaving the minimum version at 21. I then changed the deployment mode from “Carboard & Daydream” to just “Cardboard” … and BAAM! things started building.

But… once transferred over to my android, I just get a black screen.

I’m now iterating between different combinations of the SDK range and switching the deployment mode from C&D to C to see where things break again… but also if one of those pushes out an APK that actually works on my phone.

Hope this sheds more light on the possible issue.

@ ← Should be working, it links to her profile.

I guess this is what happens when someone tags one of the replies as the best answer and labels the issue as resolved even though it is not.

Unreal Engine’s forum is filled with “we haven’t heard from you in a few days, so we’re tagging this as resolved.”

Yep, happens to all of us who post on here regularly. To be fair, there is an immense load of questions and bug reports here, and Epic Staff do tend to get lots of stuff solved. It’s not actually possible for them to solve all problems and bugs. I guess marking them resolved helps them keep marching forward. I have been waiting for UE to be able to produce a distribution build for tvOS since Nov 26th, and no luck…yet – and that’s a showstopper issue for anyone trying to target an “officially supported” platform. Keep on trying!