Android Error inflating class android.Unterstützung.design.- widget.NavigationView

Fehlermeldung:

android.Blick.InflateException: Binary XML file line #16: Binary XML
Datei Zeile #16: Error inflating class
android.Unterstützung.design.- widget.NavigationView
bei
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)

xml-Datei:

<include
    layout="@layout/app_bar_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

<android.support.design.widget.NavigationView
    android:id="@+id/nav_view"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:fitsSystemWindows="true"
    app:headerLayout="@layout/nav_header_main"
    app:menu="@menu/activity_main_drawer" />

bauen.gradle:

apply plugin: 'com.android.application'

    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.2"

        defaultConfig {
            applicationId "edu.zhanglrose_hulman.bigbelly"
            minSdkVersion 15
            targetSdkVersion 23
            versionCode 1
            versionName "1.0"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }

    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:23.1.1'
        compile 'com.android.support:design:23.1.1'
        compile 'com.android.support:recyclerview-v7:23.1.1'
        compile 'com.android.support:cardview-v7:23.1.1'
        compile 'com.google.android.gms:play-services:9.2.0'
    }

styles.xml

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>

<style name="AppTheme.NoActionBar">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
</style>

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />

Ich habe gesucht, überall, nicht finden konnte, die Antwort auf mein problem. Die meisten die Antwort, die ich fand, war die Beibehaltung der design und appcompat gleiche am bauen.gradle. Aber es scheint, wie ich das richtig einrichten. Bitte helfen Sie mir.

  • Bitte Editiere deine Frage, um den kompletten stack-trace, und fixieren Sie Ihre Formatierung.
  • posten Sie Ihre styles.xml Datei in der Frage..
  • Sorry für das format. Ich bin neu auf StackOverFlow.
  • Ich habe meine styles.xml.
  • welches Gerät Sie testen können Sie mir sagen, die API version wie 4.0 oder etwas anderes..
  • können Sie die ganze xml-Datei mit der Fehlermeldung in Zeile 16 wie bereits in der Fehlermeldung, bitte?

InformationsquelleAutor SwagZ | 2016-07-10
Schreibe einen Kommentar