Skip to main content
New Participant
February 15, 2020

OVRBuild Error in Unity: Gradle bug Stopping Any Quest Development (both 2018 and 2019 Unity)

Hi,
I'm just getting started with Quest development on Unity. But I can't get through the initial tutorial / sample scenes. 

I get the same error starting with a "from scratch" project. All I do is add the Oculus integration and try and build one of the sample scenes to the device. Both 2018 and 2019.

The bug in Unity shows up as:

Gradle has exited unexpectedly.
UnityEngine.Debug:LogError(Object)
OculusBuildApp:BuildGradleProject() (at Assets/Oculus/VR/Editor/OVRBuild.cs:385)
OculusBuildApp:OVRBuildRun() (at Assets/Oculus/VR/Editor/OVRBuild.cs:285)
<>c:<StartBuildAndRun>b__29_0() (at Assets/Oculus/VR/Editor/OVRBuild.cs:261)
System.Threading.ThreadHelper:ThreadStart()

But the bug really comes down to the following code from OVRBuild:

while (apkOutputSuccessful == null)
{
  if (timeout.ElapsedMilliseconds > 50000)
  {
    UnityEngine.Debug.LogError("Gradle has exited unexpectedly.");
    apkOutputSuccessful = false;
  }
  System.Threading.Thread.Sleep(100);
}

The problem is that apkOutputSuccessful is already false before the loop is ever reached.

Help!!
I can't even get started with Quest/Unity dev while this is going on :(

Thanks,
Dave G

4 replies

New Participant
February 27, 2020
Up. Same problem man....
UtopiaImmersive
Inspiring
September 10, 2021

You find a solution to the grade problem?

 

Participant
March 3, 2020
My "gradle fail" happens on my "Build Run" on my Mac mini with high Sierra.
UtopiaImmersive
Inspiring
September 10, 2021

You ever find a solution?