刚开始 GearVR 的 Unreal 开发,经过几天的 IDE 设置和配置后,在 hello-world 教程上遇到一个奇怪的错误。希望互联网的力量可以指导我。
完成本教程: https ://docs.unrealengine.com/latest/INT/Platforms/GearVR/QuickStart/index.html
当我在 Android ETC2 上构建时,我得到一个相当长的构建错误列表,并以无用的错误结束:
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: [buildconfig] Generating BuildConfig class.
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool:
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: -pre-compile:
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool:
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: -compile:
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: [javac] Compiling 78 source files to C:\Users\User\Documents\VR\GearVR_test\Intermediate\Android\APK\bin\classes
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: [javac] C:\Users\User\Documents\VR\GearVR_test\Intermediate\Android\APK\src\com\android\vending\licensing\APKExpansionPolicy.java:20: error: package org.apache.http does not exist
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: [javac] import org.apache.http.NameValuePair;
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: [javac] ^
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: [javac] C:\Users\User\Documents\VR\GearVR_test\Intermediate\Android\APK\src\com\android\vending\licensing\APKExpansionPolicy.java:21: error: package org.apache.http.client.utils does not exist
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: [javac] import org.apache.http.client.utils.URLEncodedUtils;
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: [javac] ^
...
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: BUILD FAILED
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: C:\Users\User\AppData\Local\Android\sdk\tools\ant\build.xml:716: The following error occurred while executing this line:
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: C:\Users\User\AppData\Local\Android\sdk\tools\ant\build.xml:730: Compile failed; see the compiler error output for details.
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool:
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: Total time: 29 seconds
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: UnrealBuildTool Exception: System.IO.FileNotFoundException: Could not find file 'C:\Users\User\Documents\VR\GearVR_test\Intermediate/Android/APK/bin/GearVR_test-debug.apk'.
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: File name: 'C:\Users\User\Documents\VR\GearVR_test\Intermediate/Android/APK/bin/GearVR_test-debug.apk'
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
UATHelper: Packaging (Android (ETC2)): 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 (ETC2)): UnrealBuildTool: at UnrealBuildTool.UEDeployAndroid.PrepTargetForDeployment(UEBuildTarget InTarget)
UATHelper: Packaging (Android (ETC2)): UnrealBuildTool: at UnrealBuildTool.UnrealBuildTool.DoPostStartupStuffThatCanAccessConfigs(String[] Arguments)
UATHelper: Packaging (Android (ETC2)): CommandUtils.Run: Run: Took 112.6859102s 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.13\Engine\Binaries\DotNET\UnrealBuildTool.exe GearVR_test Android DebugGame -p
UATHelper: Packaging (Android (ETC2)): repfordeploy -project="C:\Users\User\Documents\VR\GearVR_test\GearVR_test.uproject" -NoHotReload -ignorejunk. See logfile for details: 'UnrealBuildTool-2016.09.04-17.16.25.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 AndroidPlatform.PostBuildTarget(UE4Build Build, FileReference UProjectPath, String TargetName, String Config)
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, Dictiona
ry`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 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
我可以做些什么来修复上面的错误来制作一个 APK,我应该怎么做才能理解和更好地谷歌诊断这些错误?
与此错误类似的谷歌搜索结果的参考: