Search Unity

failure to build - SDK needs better documentation and support

Discussion in 'Daydream' started by sterlingcrispin, Nov 22, 2016.

  1. sterlingcrispin

    sterlingcrispin

    Joined:
    Oct 23, 2013
    Posts:
    18
    I've built to a lot of android devices with Unity but I can't get this working and I've been at it for an hour or two now, it shouldn't be this hard.

    I've downloaded:

    • "Unity 5.4.2f2-GVR12"



    Then opened gvr-unity-sdk "DaydreamLabsControllerPlayground scenes in Unity and got a mismatched editor error. I allowed Unity to reimport everything, tried to build a sample scene to a Google Pixel and got some errors about the android-sdk not supporting VR,

    Error:(48) No resource identifier found for attribute 'enableVrMode' in package 'android'
    Error:Execution failed for task ':samples-sdk-treasurehunt:processDebugResources'.
    so I downloaded Android Studio and used the SDK manager to download API Level 24 and set that under Player Settings > Android ( which by the way this main page shows API level 21 https://unity3d.com/partners/google/daydream and is very misleading to feature this so prominently )

    Now I'm getting another series of errors, which apparently is due to overlapping JAR files.

    CommandInvokationFailure: Unable to convert classes into dex format.
    /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/sterlingcrispin/Library/Android/sdk/tools" -Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -

    stderr[
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/vr/cardboard/AndroidNCompat;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/vr/cardboard/CardboardGLSurfaceView;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/vr/cardboard/CardboardGLSurfaceView$DetachListener;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/vr/cardboard/ConfigUtils;
    Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/vr/cardboard/ContentProviderVrParamsPr​
     
    Last edited: Nov 22, 2016
    jumasudo likes this.
  2. sterlingcrispin

    sterlingcrispin

    Joined:
    Oct 23, 2013
    Posts:
    18
    I managed to create a new project and import the "GoogleVRForUnity.unitypackage" into this project and build it to the pixel,