2017-12-22 10 views
0

패브릭의 일부 전화기에서 충돌이 발생합니다. 찾지 못하고 디버깅 할 수 없습니다. 도움주세요.패브릭에서 TextView 클래스를 부 풀리는 중 오류가 발생했습니다.

치명적인 예외 : java.lang.RuntimeException가 : 활동을

ComponentInfo {com.solutions/com.solutions.MainActivity}을 (를) 시작할 수 없습니다 : 안드로이드 - 다음은

직물의 로그입니다 .view.InflateException : 바이너리 XML 파일 라인 # 8 : 바이너리 XML 파일 라인 # 8 : 오류 팽창 클래스 텍스트 뷰

android.view.InflateException에 의해 발생 : 바이너리 XML 파일 라인 # 8 : 오류가 팽창 클래스 테 xtView

** java.lang.NullPointerException이에 의해 발생 : 시도 내가 mainactivity에서 하나의 텍스트 뷰가 가상 방법 'java.lang.CharSequence

를 호출합니다 :

@BindView(R.id.toolbar_title) 
TextView toolbar_title; 

그리고 다음과 같이 버크 나이프로 버터 나이프로 바인딩합니다.

이 텍스트 뷰는 olbar 그래서 내가 여기 bottomNavigationView.setOnNavigationItemSelectedListener

내부의 텍스트를 설정하고 있어요 것은 XML이 : - 귀하의 예외 로그에서

<android.support.design.widget.AppBarLayout 
       android:layout_width="match_parent" 
       android:layout_height="wrap_content" 
       android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 
       android:background="@android:color/transparent" 
       android:stateListAnimator="@null" 
       android:id="@+id/myappbar" 
       > 


       <android.support.v7.widget.Toolbar 
       android:id="@+id/toolbar" 
       android:layout_width="match_parent" 
       android:minHeight="?attr/actionBarSize" 
       app:popupTheme="@style/ThemeOverlay.AppCompat.Light" 
       app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 
       android:layout_height="wrap_content" 
       app:layout_scrollFlags="scroll|enterAlways|snap" 
        android:background="@color/grey_700" 


       > 


       <TextView 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:fontFamily="@font/josefinsans_semibold" 
        android:layout_gravity="center" 
        android:textSize="22sp" 
        android:textColor="@color/white" 
        android:id="@+id/toolbar_title" /> 
       </android.support.v7.widget.Toolbar> 
     </android.support.design.widget.AppBarLayout> 
+0

당신에게도 xml을 게시하십시오. –

+0

레이아웃 게시 xml – ADM

+0

고마워요 지금 추가했습니다 –

답변

0

, 그 이유는 XML에서 오류 구문 분석 컬러리스트가있다. @ font/josefinsans_semibold를 제거하고 @ color/white의 값을 확인하십시오.

<android.support.design.widget.AppBarLayout 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 

android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 
      android:background="@android:color/transparent" 
      android:stateListAnimator="@null" 
      android:id="@+id/myappbar" 
      > 


      <android.support.v7.widget.Toolbar 
      android:id="@+id/toolbar" 
      android:layout_width="match_parent" 
      android:minHeight="?attr/actionBarSize" 
      app:popupTheme="@style/ThemeOverlay.AppCompat.Light" 
      app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" 
      android:layout_height="wrap_content" 
      app:layout_scrollFlags="scroll|enterAlways|snap" 
       android:background="@color/grey_700" 


      > 


      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_gravity="center" 
       android:textSize="22sp" 
       android:textColor="#ffffff" 
       android:id="@+id/toolbar_title" /> 
      </android.support.v7.widget.Toolbar> 
    </android.support.design.widget.AppBarLayout> 
관련 문제