Search code examples
androidgoogle-vr

Error VrPanoramaView Xml


I am using the new library for vr360 image from Google

I have an issue when i run the app on Samsung Galaxy s6 (6.0) it crash. But when i run the app on other devices etc Nexus 4 (5.+) all running good.

I try to run the Lab app on S6 and works perfect.. Demo Url: https://codelabs.developers.google.com/codelabs/vr_view_app_101/index.html?index=..%2F..%2Findex#0

My error:

android.view.InflateException: Binary XML file line #8: Binary XML file line #8: Error inflating class com.google.vr.sdk.widgets.pano.VrPanoramaView

My Xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">


    <com.google.vr.sdk.widgets.pano.VrPanoramaView
        android:id="@+id/pano_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="5dip" />

</LinearLayout>

My Gradle :

   compile project(':gvr-android-sdk/libraries:common')
    compile project(':gvr-android-sdk/libraries:commonwidget')
    compile project(':gvr-android-sdk/libraries:panowidget')

and Settings.gradle

include ':gvr-android-sdk/libraries:audio'
include ':gvr-android-sdk/libraries:base'
include ':gvr-android-sdk/libraries:common'
include ':gvr-android-sdk/libraries:commonwidget'
include ':gvr-android-sdk/libraries:panowidget'
include ':gvr-android-sdk/libraries:videowidget'

Solution

  • Add the following abiFilters to buildTypes in build.gradle file of your project.

    buildTypes {
        release {
            ndk {
                abiFilters "armeabi", "armeabi-v7a", "x86"
            }
        }}