Skip to main content
Up and Coming
September 12, 2015

GearVR is not building at all

This is Unity 5.2 in Windows 8.1.

I was building GearVR in Unity 5.1 without any real issue. However this first happened when transferring a project from Unity 4 to Unity 5.2 (which I had installed just before over 5.1).

The build would fail - giving errors - which I thought might be due to project problems. However this ALSO occurs in a completely BLANK project, with only 'Android' set, VR turned on and a cube in a scene - there's nothing in the project that could cause this.

The errors come as the following in the blank project:

http://i.imgur.com/U44cLLA.png

This may or may not be to do with Java? Really I have NO idea.

They declare 'duplicate' files in the APK? As above there are NO assets in this project so it is NOT down to the files I have added (I have added none).

To repost those errors:

-------------

[CAPI] LibOVR module is located at C:\Windows\SYSTEM32\LibOVRRT64_0_6.dll

-------------

Error: Duplicate file(s) in apk: 'C:\PROJECT FILES\VR-Art-Led\TestGearVR5\Temp\StagingArea\android-libraries\ovrplugin\assets'

UnityEditor.HostView:OnGUI()

-------------

CommandInvokationFailure: Failed to build apk. See the Console for details.
C:/Program Files/Java/jdk1.7.0_80\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/Fire Panda/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\androidplayer/Tools\sdktools.jar" -

stderr[
Error: Duplicate file(s) in apk: 'C:\PROJECT FILES\VR-Art-Led\TestGearVR5\Temp\StagingArea\android-libraries\ovrplugin\assets'
]
stdout[

]
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.HostView:OnGUI()

-------------

Error building Player: CommandInvokationFailure: Failed to build apk. See the Console for details.
C:/Program Files/Java/jdk1.7.0_80\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Users/Fire Panda/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\androidplayer/Tools\sdktools.jar" -

stderr[
Error: Duplicate file(s) in apk: 'C:\PROJECT FILES\VR-Art-Led\TestGearVR5\Temp\StagingArea\android-libraries\ovrplugin\assets'
]
stdout[

]


-------------
    This topic has been closed for replies.

    8 replies

    Inspiring
    September 12, 2015
    The problem is probably the file Assets/Plugins/Android/assets/donotdelete.txt. Can you delete that?
    Inspiring
    September 13, 2015
    Yeah, deleting the donotdelete file solved this for me. Only to be expected I guess. :)
    Scorched Battalion - VR Jam edition available for Gear VR and DK2 (Win/Mac/Linux) Jungle Juice Sven Co-op
    Inspiring
    September 13, 2015
    Glad to hear it worked. The donotdelete.txt file shouldn't really ship with the package and unfortunately, a second copy of it has crept into Unity itself. The plan is to remove both.
    Up and Coming
    September 13, 2015
    "vrdaveb" wrote:
    The problem is probably the file Assets/Plugins/Android/assets/donotdelete.txt. Can you delete that?


    Yes, that solved the problem with building. Thanks!

    However, builds are not working. This is both Note 4 and S6. Note 4 is simply crashing and S6 is giving me a security warning - as if it's not been signed (when the sig file is there).
    Fire Panda LTD
    Inspiring
    September 13, 2015
    There is a known Note 4 crash in 5.1.3p3, but not in earlier versions. Can you try 5.1.2f1? The security warning is probably valid. Please make sure the signature file you're using is for the phone you're building for. Also double-check in Windows Explorer or Finder that Unity hasn't renamed it to something other than "oculussig".
    Up and Coming
    September 13, 2015
    "vrdaveb" wrote:
    There is a known Note 4 crash in 5.1.3p3, but not in earlier versions. Can you try 5.1.2f1? The security warning is probably valid. Please make sure the signature file you're using is for the phone you're building for. Also double-check in Windows Explorer or Finder that Unity hasn't renamed it to something other than "oculussig".


    Downgrade fixed the crashing issue, thanks!
    Fire Panda LTD
    New Participant
    October 27, 2015
    "vrdaveb" wrote:
    The problem is probably the file Assets/Plugins/Android/assets/donotdelete.txt. Can you delete that?


    Best advice of the day. Worked for me, too. I probably would've thought you were joking if it hadn't worked for someone else, though!
    Inspiring
    October 27, 2015
    Yeah, and you know that tag on your pillow that says "May not be removed under penalty of law"? Remove it. :D
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV