No announcement yet.

GoogleVR - Crash opening application on device.

  • Filter
  • Time
  • Show
Clear All
new posts

    [Daydream] GoogleVR - Crash opening application on device.

    After compiling in UE4.21 application crash on startup.In UE4.20 everything worked.What could be the reason?
    Device: Xiaomi Mi5s Plus (Android 7.0)
    Error log:
    java.lang.NoSuchFieldError: No field ui_settings_button_holder of type I in class Lcom/google/vr/cardboard/R$id; or its superclasses (declaration of '$id' appears in /data/app/
    at com.epicgames.ue4.GameActivity.onCreate(
    at android.os.Handler.dispatchMessage(
    at android.os.Looper.loop(
    at java.lang.reflect.Method.invoke(Native Method)

    Hey,have you found a solution? It happend too when I open my GoogleVR project on Pixel.


      We are also experiencing this problem. There seems to be a bug report here documenting the exact same issue:

      Unfortunately, it has been marked as "Cannot Reproduce" but I hope someone at Epic takes another look because it is clearly still an issue in 4.21 for several people.

      I have spent several days already trying to fix this but my only solution is to use 4.19 at the moment. When you disable the Google VR plugin it launches successfully.

      I have tried the following devices (All Android 8.0):
      Samsung S7
      Samsung A5 (2017)
      LG G6

      Strangely enough it seems to work when running on a Google Pixel 2 (Android 9.0).

      We have tried:
      • Different SDK and NDK configurations (we currently try to target android-26)
      • Updated engine to 4.21.2
      • Two different Windows 10 based development machines
      • Fresh install of Unreal Engine and Android Development (as per UE documentation) on our Mac mini (OSX 10.14)

      None of this has worked for us. My logcat is always the same result (exactly what AlloteSoftware posted).


        I'm having this problem, too. But on some samrtphone the game runs and works great... for example, sometimes it helps to install "google vr services" and "cardboard" on your smartphone. Thus, this error was corrected on the smartphone Le 2 (le_s2). But on other models it didn't help.
        The problem I first encountered when I started trying to download a finished game on google play. I was developing a game in UE4.19 and api23 everything worked fine, but downloading apps from google play requires api not below 26. I tried selecting target api 26 or 27, but the game only showed a black screen at startup. When I shut off the VR plug-in, everything started to work. It seems that VR plugin in UE4.19 cannot work with api 26 and above. To fix this, I updated UE4 to 4.19.2 but got the "java.lang.NoSuchFieldError..." on a large count of samrtphones.

        Click image for larger version

Name:	file.jpg
Views:	1
Size:	88.9 KB
ID:	1577069
        automatic test shows here are the results-on some models the game somehow works. Probably why Epic could not repeat it and marked the error as " Cannot Reproduce". At this point I keep looking for any options to fix this error...


          My application in the version ue 4.22 (preview) does not work yet.


            My personal theory is that the Google VR plugin used in UE4.21 and later only works with Daydream compatible phones. It works for me in UE4.20 on a GalaxyJ7 and an old Nexus7, the report mentioned earlier,, has been updated saying, "This issue was encountered during the XR compat pass and crash did not occur on 13832_Galaxy_S9_Mali.", a Daydream compatible phone.


              Originally posted by clintonman View Post
              My personal theory is that the Google VR plugin used in UE4.21 and later only works with Daydream compatible phones
              I think you're right I asked my friends to check if their smartphone supports daydream. It turned out that daydream is not supported on all problematic devices... and the game does not work, although in such cases, it should work with cardboard.

              the game not work and daydream not supported:

              Asus ZenFone Max Pro
              Galaxy S7 edge (hero2lte)

              the game work (in cardboard) and daydream supported:

              Xiaomi redmi note 3 pro (custom android 8.1)
              Le 2 (le_s2) (custom android 8.1)

              My friend was able to run the game (Galaxy S7 edge) when he installed the module to enable daydream support. The game started, but did not work correctly... The description of this module says that it adds 2 lines to build.prop file. One of these lines indicates support for high performance mode...Perhaps if you disable this mode in project settings, it will be a temporary solution to the problem... I'll check it out and write here if it works...
              Attached Files


                So I wanted to provide an update on what I was able to finally get working and publish a Google Cardboard VR app to the Play Store. It ended up working on all devices tested (so far). Just wanted to share what I ended up doing in hopes it helps someone. Please note this was ONLY for a Cardboard VR app and NOT a Daydream app, so there might still be some issues related to that I am unaware of.

                1) Download the Google VR branch of the Unreal Engine here: (for instructions on how to access this please refer to the Unreal Documentation here: ). I used the Google 4.20 branch of the Unreal Engine.

                2) Follow the build instructions on the Github page under the section "Getting up and running"

                3) *Important* As per a bug reported here: you will need to manually go into the source code and comment out a couple lines of code. Without doing this you will most likely still experience crashes using the back / close button on certain devices.

                We have coordinated with Epic and found a work-around for those still experiencing this issue.

                Edit the file Engines/Source/Runtime/ApplicationCore/Private/Android/AndroidWindow.cpp.
                Search for the function FAndroidWindow::GetScreenRect() and comment out the if block at line 198:

                //if (bIsDaydreamApp && Window == NULL)
                // ...

                Save and rebuild your app. You should then find that pressing 'X' to close the app will return you to the Android Home screen, and using the App Switcher to select your app should quickly return you to the initial VR screens and restart your app.
                4) Setup your project using the proper Google VR / Android configuration settings located under the Google VR Quickstart Guide:

                Note: For my specific project I was using:
                Android NDK: android-ndk-r15c
                SDK API Level: android-26
                NDK API Level: latest

                That should be it! Good luck!