当我构建或“构建并运行”项目时,我遇到三个主要错误。该项目之所以有效,是因为当我按下播放键时,它会执行它在游戏窗口中应该执行的操作。我正在尝试为我在项目设置中选择的gearVr和Oculus开发。
我查看了单位偏好设置,以确保其使用正确的SDK,JDK和NDK,我什至尝试使用建议的设置,但仍然无法将任何内容上传到我的设备。
错误1
CommandInvokationFailure:Gradle构建失败。 C:\程序 文件\ Unity \ Hub \ Editor \ 2019.1.2f1 \ Editor \ Data \ PlaybackEngines \ AndroidPlayer / Tools \ OpenJDK \ Windows \ bin \ java.exe -classpath“ C:\ Program Files \ Unity \ Hub \ Editor \ 2019.1.2f1 \ Editor \ Data \ PlaybackEngines \ AndroidPlayer \ Tools \ gradle \ lib \ gradle-launcher-4.6.jar” org.gradle.launcher.GradleMain“ -Dorg.gradle.jvmargs = -Xmx4096m” “ assembleRelease”
stderr [
失败:构建失败,并出现异常。
- 出了什么问题:任务':packageRelease'的执行失败。
org.gradle.tooling.BuildException(无错误消息)...
错误2
构建完成,结果为“失败” 0x00007FF6E6F9104C(统一) StackWalker :: GetCurrentCallstack 0x00007FF6E6F94501(Unity) StackWalker :: ShowCallstack 0x00007FF6E56FDCC5(Unity)GetStacktrace 0x00007FF6E79AF1D0(统一)DebugStringToFile 0x00007FF6E6FBFB49 (统一)DebugLogHandler_CUSTOM_Internal_Log 0x00000200025704EB(Mono JIT代码)(包装器由本机托管) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,字符串,UnityEngine.Object) ...
错误3
UnityEditor.BuildPlayerWindow + BuildMethodException:53个错误
在UnityEditor.BuildPlayerWindow + DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions选项)在[0x00242]中 C:\ buildslave \ unity \ build \ Editor \ Mono \ BuildPlayerWindowBuildMethods.cs:194
在UnityEditor.BuildPlayerWindow.CallBuildMethods(System.Boolean askForBuildLocation,UnityEditor.BuildOptions defaultBuildOptions) [0x0007f]在 C:\ buildslave \ unity \ build \ Editor \ Mono \ BuildPlayerWindowBuildMethods.cs:97 0x00007FF6E6F9104C(Unity)StackWalker :: GetCurrentCallstack 0x00007FF6E6F94501(Unity)StackWalker :: ShowCallstack 0x00007FF6E56FDCC5(统一)GetStacktrace 0x00007FF6E79AF1D0(统一) DebugStringToFile 0x00007FF6E6FBFB49(统一) DebugLogHandler_CUSTOM_Internal_Log 0x00000200025704EB(Mono JIT代码) (包装器管理为本地)UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,字符串,UnityEngine.Object) 0x00000200025703AB(Mono JIT代码)[DebugLogHandler.cs:10] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object []) 0x0000020002564691(Mono JIT代码)[Logger.cs:61] UnityEngine.Logger:Log(UnityEngine.LogType,object) 0x000002000257E7ED(Mono JIT代码)[Debug.bindings.cs:127] UnityEngine.Debug:LogError(对象)0x0000020039D5E5E3(Mono JIT 代码)[BuildPlayerWindowBuildMethods.cs:103] UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)0x0000020039D377FB(Mono JIT代码) [BuildPlayerWindow.cs:908] UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform)
通常,apk会上传到我的手机,要求我将设备放入GearVR。
答案 0 :(得分:0)
Gradle似乎有问题。作为解决方法,您可以尝试在“构建”窗口中从“渐变”切换为“内部”。