2

In my app i want to view 360 image. So i am following the tutorial from https://codelabs.developers.google.com/codelabs/vr_view_app_101/index.html?index=..%2F..%2Findex#6

I am using genymotion emulator with android 6.0

My app builds well. the following is my build.gradle but i am getting error when it runs.

buid.gradle (file)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}


apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
        applicationId "com.vr.govinda"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
/*
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
*/

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


    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }

    }


}
dependencies {
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:design:23.3.0'
    compile project(':gvr-android-sdk/libraries:common')
    compile project(':gvr-android-sdk/libraries:commonwidget')
    compile project(':gvr-android-sdk/libraries:panowidget')
} 

the error i am getting is:

Process: com.vr.govinda, PID: 24853
android.view.InflateException: Binary XML file line #31: Error inflating class com.google.vr.sdk.widgets.pano.VrPanoramaView
    at android.view.LayoutInflater.createView(LayoutInflater.java:633)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
    at com.google.devrel.vrviewapp.WelcomeFragment.onCreateView(WelcomeFragment.java:34)
    at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
Santhosh
  • 9,965
  • 20
  • 103
  • 243
  • Same happens to me with emulator but with real devices it works without any problem – Wardruna Sep 18 '16 at 09:03
  • 1
    Yes. For emulator i have to change to another .so file and then it worked. it worked . read "Using the Google VR SDK on mutiple architectures" at https://github.com/googlevr/gvr-android-sdk/blob/master/libraries/native/README.md. you have to create a `jniLibs/x86` folder in the app folder and inside it paste libpanorenderer.so from `gvr-android-sdk/libraries/native/x86/libpanorenderer.so`. then do some changes in build.gradle to include jnilibs – Santhosh Sep 18 '16 at 11:14

0 Answers0