Reputation: 367
When I build or "build and run" the project I get three main errors. The project works because when I press play it does what it suppose to do in the game window. I'm trying to develop for the gearVr and Oculus which I selected in project settings.
I've looked at unity preferences made sure its using the correct SDK, JDK and NDK I even tried using the recommended settings but still couldn't upload anything to my device.
ERROR 1
CommandInvokationFailure: Gradle build failed. C:\Program Files\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[
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':packageRelease'.
org.gradle.tooling.BuildException (no error message) ...
ERROR 2
Build completed with a result of 'Failed' 0x00007FF6E6F9104C (Unity) StackWalker::GetCurrentCallstack 0x00007FF6E6F94501 (Unity) StackWalker::ShowCallstack 0x00007FF6E56FDCC5 (Unity) GetStacktrace 0x00007FF6E79AF1D0 (Unity) DebugStringToFile 0x00007FF6E6FBFB49 (Unity) DebugLogHandler_CUSTOM_Internal_Log 0x00000200025704EB (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object) ...
ERROR 3
UnityEditor.BuildPlayerWindow+BuildMethodException: 53 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97 0x00007FF6E6F9104C (Unity) StackWalker::GetCurrentCallstack 0x00007FF6E6F94501 (Unity) StackWalker::ShowCallstack 0x00007FF6E56FDCC5 (Unity) GetStacktrace 0x00007FF6E79AF1D0 (Unity) DebugStringToFile 0x00007FF6E6FBFB49 (Unity) DebugLogHandler_CUSTOM_Internal_Log 0x00000200025704EB (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object) 0x00000200025703AB (Mono JIT Code) [DebugLogHandler.cs:10] UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[]) 0x0000020002564691 (Mono JIT Code) [Logger.cs:61] UnityEngine.Logger:Log (UnityEngine.LogType,object) 0x000002000257E7ED (Mono JIT Code) [Debug.bindings.cs:127] UnityEngine.Debug:LogError (object) 0x0000020039D5E5E3 (Mono JIT Code) [BuildPlayerWindowBuildMethods.cs:103] UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions) 0x0000020039D377FB (Mono JIT Code) [BuildPlayerWindow.cs:908] UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform)
Normally the apk will be uploaded to my phone asking me to place the device into the GearVR.
Upvotes: 0
Views: 1439
Reputation: 371
There seems to be a problem with Gradle. As a workaround you could try to switch from "gradle" to "internal" in the Build Window.
Upvotes: 0