Unable to start activity ComponentInfo{}: android.view.InflateException: Binary XML file line #11: Binary XML file line #267
12:57 09 Oct 2019

In some phones the following error is occurring. I am not able to identify the problem by reviewing the log details. log details and xml file contents can view below.

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ayush.prana/com.ayush.prana.HomeNew}: android.view.InflateException: Binary XML file line #11: Binary XML file line #267: Error inflating class 
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2429)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2493)
    at android.app.ActivityThread.-wrap11(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1357)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at androidx.test.espresso.base.Interrogator.a(Interrogator.java:19)
    at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:166)
    at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:158)
    at androidx.test.espresso.base.UiControllerImpl.a(UiControllerImpl.java:138)
    at androidx.test.espresso.action.Tap$1.a(Tap.java:6)
    at androidx.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:20)
    at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:9)
    at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:79)
    at androidx.test.espresso.ViewInteraction.a(ViewInteraction.java:96)
    at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:3)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    at android.os.Handler.handleCallback(Handler.java:746)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5459)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: android.view.InflateException: Binary XML file line #11: Binary XML file line #267: Error inflating class 
    at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
    at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
    at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
    at com.ayush.prana.HomeNew.onCreate(HomeNew.java:75)
    at android.app.Activity.performCreate(Activity.java:6259)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130)
    at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:184)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2382)
    ... 22 more
Caused by: android.view.InflateException: Binary XML file line #267: Error inflating class 
    at android.view.LayoutInflater.createView(LayoutInflater.java:645)
    at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)
    at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:971)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:831)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:971)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:831)

The issue is random not facing in all phones

activity_home_new.xml




    

    


app_bar_home_new.xml

    


    

        

    

    

    


content_home_new.xml

    


    

        

        
    

    
    

    

app Gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.ayush.prana"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 3
        versionName "1.1"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.navigation:navigation-fragment:2.0.0'
    implementation 'androidx.navigation:navigation-ui:2.0.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'com.github.smarteist:autoimageslider:1.3.2'
    implementation 'com.github.bumptech.glide:glide:4.9.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
    implementation 'com.github.bumptech.glide:glide:4.9.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
    implementation 'com.amitshekhar.android:android-networking:1.0.2'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.android.support:support-v4:28.0.0' // v4
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation project(path: ':androidHorizontalListView')// v7
    implementation 'com.google.firebase:firebase-auth:17.0.0'
    implementation 'com.google.android.gms:play-services-auth:17.0.0'
    implementation 'com.brucetoo.pickview:library:1.2.3'
    implementation project(path: ':photoview')
    implementation project(path: ':dialog')
}
apply plugin: 'com.google.gms.google-services'

project Gradle

buildscript {
    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        classpath 'com.google.gms:google-services:4.3.2'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
ext {
    sdkVersion = 28
}

I can't find what is the problem for this random issue. for any positive reply thanks in advance.

android navigation-drawer