Search Unity

Android/Google Cardboard: app crashes immediately after opening

Discussion in 'AR/VR (XR) Discussion' started by catscatscats, Oct 31, 2015.

  1. catscatscats

    catscatscats

    Joined:
    Oct 31, 2015
    Posts:
    1
    Hi, I am very new in Unity. I was trying to make a virtual reality app for my phone, so I did the demo on the Google Developers website. It works fine in Unity, but when I download it to my phone, whenever I open it, it opens a black screen for a few seconds, and then crashes. No splash screen.

    Help?
     
  2. RichTufty

    RichTufty

    Joined:
    Jul 12, 2012
    Posts:
    23
    I'm getting similar issues, since v0.52, just updated to v0.6 and still getting same issues. Using Samsung Galaxy S6 Edge Android 5.1.1 I get these issues, however works fine on Nexus 5.

    I have the same issues with Google Cardboard app, and other Google Cardboard apps/games from the Play Store. Sometimes I get a splash screen, sometimes not, but phone says "Unfortunately, <<insert app name>> has stopped."

    Any ideas?
     
  3. SummitJain

    SummitJain

    Joined:
    May 30, 2014
    Posts:
    12
    google cardboard sample demo scene crashes on android 5.1 using Unity 5.3.2p3 or for that matter 5.2.1p4..

    I am able to use that only on samsung s6.. but one plus one.. asus zenfone and all other devices it crashes immediately.

    no splash screen ...

    Giving the error:
    02-17 19:53:10.455 23325-23440/? E/VrApiLoader: Oculus updates needed.
    02-17 19:53:10.456 23325-23440/? E/E:\tw\33a21edae6c0e9ad\Software\OculusSDK\Integrations\Unity\Releases\0: VrApi initialization error.
    02-17 19:53:10.456 23325-23440/? E/EntryPoints: vrapi_GetVersionString was called before vrapi_Initialize()!
    02-17 19:53:10.456 23325-23440/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 23440 (Thread-2842)
    02-17 19:53:42.900 757-1126/? E/AudioTrack: AudioTrack::set : Exit
    02-17 19:53:42.919 239-847/? E/ACDB-LOADER: Error: ACDB AudProc vol returned = -19
    02-17 19:53:42.919 239-847/? E/ACDB-LOADER: Error: ACDB AFE returned = -19
    02-17 19:53:43.195 757-783/? E/WindowManager: Performed 6 layouts in a row. Skipping
    02-17 19:53:43.296 23508-23527/? E/Unity: Unable to find libaudiopluginvrunity

    I have installed the latest jdk android support libraries and followed 100 % of the instructions.

    It works perfectly fine on editor and on android it crashes immediately..

    Any help will be much appreciated.

    Cheers!!
     
  4. AlexKrunch

    AlexKrunch

    Joined:
    Feb 17, 2016
    Posts:
    12
    You should disable the Oculus rift SDK to run on all android devices.
    It's work on the Samsung S6 because the Gear VR (from Samsung) and the Oculus Rift share the same SDK, but it won't work on others Android devices.
     
    SummitJain likes this.
  5. SummitJain

    SummitJain

    Joined:
    May 30, 2014
    Posts:
    12
    Hello
    How would i disable Oculus rift SDK. Please note i am using Unity 5.3.2 and this is one link i got.. can you guide me here plz:
    http://forum.unity3d.com/threads/oc...nabled-i-want-to-disable-hmd-tracking.335636/
     
  6. AlexKrunch

    AlexKrunch

    Joined:
    Feb 17, 2016
    Posts:
    12
    I absolutely don't know how to disable the Oculus rift SDk, never tried it, because it's make crash my Mac each time I've tried to run it. Try to take off the OVRPlayerController prefab or the OVRCameraRig instance in your scene. Take them off, don't just disable them.

    I don't know if there's other thing to disable...
     
    SummitJain likes this.
  7. SummitJain

    SummitJain

    Joined:
    May 30, 2014
    Posts:
    12
    Hi, I SOLVED THE PROBLEM. It was bcoz of the audio Settings which was giving the trouble.
     
    AlexKrunch likes this.
  8. AlexKrunch

    AlexKrunch

    Joined:
    Feb 17, 2016
    Posts:
    12
    You mean the oculus SDK is not responsive for the crash on the other devices? or you successfully disabled the Oculus SDK?
     
  9. SummitJain

    SummitJain

    Joined:
    May 30, 2014
    Posts:
    12
    Hi,

    You're right it was the oculus sdk only that was causing the crashing using the google cardboard sdk. So basically just turn off VR supported in player settings and the google cardboard sdk should work. Thanks!1
     
  10. luisquid

    luisquid

    Joined:
    Mar 21, 2015
    Posts:
    38
    OMG OMG OMG THANK YOU! I've been working days on why my app is crashing and this solved it! :D:D:D
     
  11. vanshika1012

    vanshika1012

    Joined:
    Sep 18, 2014
    Posts:
    48
    I am facing the same problem. I didnt check "Virtual Reality option", still my application getting crashed. But I remove "GVR Audio Listener" then application doesnot crash, but VR still not working.
     
  12. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    What version of Unity and what version of GoogleVR? Did you import compatiblity pack as seen in this video at 6:30?
     
  13. enabizness

    enabizness

    Joined:
    Jan 17, 2017
    Posts:
    1
    I don't know how to make a VR game pls can someone help me
     
  14. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    Hmmmmm WHERE would one learn this??? Maybe you could go to the local community college and see if they offer classes on making VR games.
     
  15. DevGallie

    DevGallie

    Joined:
    Nov 4, 2015
    Posts:
    4
    Did anyone get the GoogleVR demo working with Unity 3D 5.6.0b3 or 5.6.0b4 using GoogleVRForUnity v1.10?
    I am using a Nexus 5X as target device. I have had the demo working on Unity 5.4.2, but no longer after upgrading to Unity 5.5.0.
    With Unity 5.6.0b3 I could get it to work on my Nexus 5X, but only when I created a completely new project.

    I cannot get it to work on my old project when I import the GoogleVRForUnity v1.10 package and attempt to build it. In this scenario my player in the IDE works ok, but when the scene is built and deployed on the Nexus 5X it immediately crashes.

    I would like to debug the crashing app on my Nexus 5X from within Unity, does anyone have an idea how to do that?
    I would also like to get some log files from the app on the Nexus 5X. Where are they stored and how do I set the logging level?

    Currently I am using:
    - Unity3D 5.6.0b4
    - GoogleVRForUnity v1.10
    - Visual Studio 2015 update 3 Community Edition
    - Visual Studio Tools for Unity 2.8.0.0
    - Windows 10
    - Android Studio 2.2.3
    - Android SDK Platform-Tools 25.0.3
    - Android SDK Tools 25.2.5
    - Android SDK Platforms: 7.1.1, 7.0, 6.0, 5.1.

    On my Nexus 5X I use Unity Remote 5.
     
  16. DevGallie

    DevGallie

    Joined:
    Nov 4, 2015
    Posts:
    4
    Last edited: Jan 22, 2017
  17. DevGallie

    DevGallie

    Joined:
    Nov 4, 2015
    Posts:
    4
    Found the error using LogCat (part of Android Device Monitor):
    "java.lang.ClassNotFoundException: Didn't find class "com.google.unity.GoogleUnityActivity" on path:"

    The solution was:
    1. Delete the following directories from the Assets directory in the Unity project:
    - GoogleVR
    - Plugin
    2. Go to menu Assets -> Import Package -> Custom Package...
    3. Navigate to the GoogleVRForUnity.unitypackage file (is reused v1.10)
    4. After decompression and some other steps, the Import dialog in displayed. Select all items (I then disabled Plugin -> iOS and Plugin -> x84 because I do not use them.

    Now all works fine.
     
    Last edited: Jan 22, 2017
  18. Bambivalent

    Bambivalent

    Joined:
    Jan 25, 2017
    Posts:
    16
    I also experienced crashing of Android build in Unity 5.5.1 and Google VR SDK 1.2. I needed to turn off Google VR Sound and (quite ambiguously) 'Virtual Reality Supported' in the Android settings.
     
  19. heus92

    heus92

    Joined:
    Feb 16, 2017
    Posts:
    1
    Hi ! I'm having the same problem right now ! Could you tell me how you did this please ?
     
  20. xpansivevr

    xpansivevr

    Joined:
    Jun 22, 2016
    Posts:
    27
    same issue here... any help is appreciated.
     
  21. Real-LifeAssets

    Real-LifeAssets

    Joined:
    May 9, 2020
    Posts:
    3
    Now it works, tested in Unity 2017.4.40f1 and GoogleVRForUnity_1.200.1.unitypackage. The trick was to use Unity 2017.4 because Unity 2018 LTS is no longer supported