Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
nickpittom's avatar
nickpittom
Protege
11 years ago

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[

]


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

8 Replies

Replies have been turned off for this discussion
  • The problem is probably the file Assets/Plugins/Android/assets/donotdelete.txt. Can you delete that?
  • Yeah, deleting the donotdelete file solved this for me. Only to be expected I guess. :)
  • 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.
  • "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).
  • 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".
  • "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!
  • bsuvis's avatar
    bsuvis
    Honored Guest
    "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!
  • Yeah, and you know that tag on your pillow that says "May not be removed under penalty of law"? Remove it. :D