- Home /
Unity 5.3.4p6 Android VR Crash on Start
I have VR enabled on Player Settings, and I'm having no trouble getting VR working with the Oculus. However, when I build to Android with VR enabled, the app crashes on start up before even the splash screen can show (just black screen). I have the build setting matching the guide shown here: https://developer.oculus.com/documentation/game-engines/latest/concepts/unity-build-android/
When I have VR disabled, the app runs fine, even after I add on Google Cardboard plugins, which leads me to believe that my Android SDK is configured correctly.
I am working on Windows 10, Unity 5.3.4p6 64-bit, and Android 6.0 LG G3. I have also tried this on an emulator with the same OS. I have tried using the VR Samples package available for free here: https://www.assetstore.unity3d.com/en/#!/content/51519
These issues are persistent with both my project and a blank one, and across versions 5.3.4, 5.3.4p5, and 5.3.4p6.
Here is the error that appears when I try to run it on an emulator:
05-19 10:03:41.476 2274 2274 E AndroidRuntime: Caused by: java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class android.appwidget.AppWidgetHostView$ParcelableSparseArray instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/0x4. Make sure other views do not use the same id.
I've Googled the error, but couldn't find anything particularly relevant. It seems to me that the way Unity natively builds VR onto an Android is just handled incorrectly, at least on my computer.
Thank you for your help.
Having the same problem with Unity 5.3.4f1 & a Samsung Galaxy S6 running Android 6.0.1.
I've created a few different simple Gear VR apps and been able to run them on device, but when I "Build & Run" the VR Samples project, I get a black screen that persists for a few $$anonymous$$utes before app crashes.
Since I am able to run simpler apps on the same device, I wondering if this problem is caused either because the project uses feature that only run properly on the Rift, or perhaps has default setting that are too much for a Gear VR device to handle.
That's interesting. $$anonymous$$y crashing happens for even the simplest projects. Have you tried looking at the error message that comes up in logcat?
I have not. I am using Google cardboard for now.
UNcheck the VR supported box. Its only for the Oculus. I also assumed i had to check it but for android it wont work. 
Your answer
Follow this Question
Related Questions
Switching VR platforms via VRSettings 0 Answers
Android Build Crashing on some of the devices, Error: Animator::Transfer(SafeBinaryRead&) 0 Answers
Unable To Understand Android Crash : android.view.ViewGroup.offsetRectBetweenParentAndChild 0 Answers
Unauthorized access exeption when building to Oculus quest 2 0 Answers
[Crash] Unity with GearVR can crash after allowing permissions after first installation 1 Answer