2016-11-23 4 views
2

내가 오류가 this error으로 Google VR나는 오류 : 바이너리 XML 파일 라인 # 44 : 오류 팽창 클래스 com.google.vr.sdk.widgets.video.VrVideoView

를 사용하는 동안 (: 응용 프로그램 모듈) :

<LinearLayout 
    android:layout_width="match_parent" 
    android:orientation="vertical" 
    android:layout_height="wrap_content"> 
<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="@string/gorilla_info" 
    android:layout_marginTop="@dimen/activity_vertical_margin" 
    android:layout_marginStart="@dimen/activity_horizontal_margin" 
    android:layout_marginBottom="@dimen/activity_vertical_margin" 
    android:id="@+id/textView" /> 
    <com.google.vr.sdk.widgets.video.VrVideoView 
     android:id="@+id/video_view" 
     android:layout_width="match_parent" 
     android:scrollbars="none" 
     android:layout_height="250dip"/> 

    <!-- Seeking UI & progress indicator.--> 
    <SeekBar 
     android:id="@+id/seek_bar" 
     style="?android:attr/progressBarStyleHorizontal" 
     android:layout_height="32dp" 
     android:layout_width="fill_parent"/> 
    <TextView 
     android:id="@+id/status_text" 
     android:text="Loading Video..." 
     android:layout_height="wrap_content" 
     android:layout_width="fill_parent" 
     android:textSize="12sp" 
     android:paddingStart="32dp" 
     android:paddingEnd="32dp"/> 


</LinearLayout> 

이 내 Build.gradle입니다 :

android.view.InflateException: Binary XML file line #44: Error inflating class com.google.vr.sdk.widgets.video.VrVideoView 

내 레이아웃입니다

,691,363 (210)
android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.2" 

    defaultConfig { 
     applicationId "com.google.devrel.vrviewapp" 
     minSdkVersion 19 
     targetSdkVersion 23 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
      ndk { 
       abiFilters "armeabi", "armeabi-v7a", "x86" 
      } 
     } 
    } 
} 
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') 
    compile project(':gvr-android-sdk/libraries:videowidget') 
    compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7' 
} 

그것은 onCreateView의 첫 번째 줄() 메소드

View view = inflater.inflate(R.layout.gorilla_fragment, container,false); 


    @Nullable 
     @Override 
     public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 
      View view = inflater.inflate(R.layout.gorilla_fragment, container,false); 
      seekBar = (SeekBar) view.findViewById(R.id.seek_bar); 
      statusText = (TextView) view.findViewById(R.id.status_text); 
      videoWidgetView = (VrVideoView) view.findViewById(R.id.video_view); 
} 

그것은 모든 가상 장치와 실제 장치에 실패한 것에 실패합니다.

무엇이 문제입니까?

도움 주셔서 감사합니다.

답변

0

문제점에 대한 해결책을 찾았습니다. (: 응용 프로그램 모듈) : 오류를 수정하기 위해, 나는 Build.gradle에

'com.google.android.exoplayer:exoplayer:r1.5.10' 

를 추가해야

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') 
    compile project(':gvr-android-sdk/libraries:videowidget') 
    compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7' 

}

관련 문제