Сообщение об ошибке:Android Ошибка при наполнении класса android.support.design.widget.NavigationView
android.view.InflateException: Binary XML файл строка # 16: Binary XML файл строка # 16: раздувание Ошибка класс android.support.design.widget.NavigationView на android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2416)
XML файл:
<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" />
build.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" />
Я искал везде, не мог найти ответ на мою проблему. Большая часть ответа, который я нашел, заключалась в том, что дизайн и appcompat были такими же в build.gradle. Но похоже, что у меня это правильно настроено. Пожалуйста, помогите мне.
Пожалуйста, измените вопрос, чтобы обеспечить полную трассировку стека, и исправить форматирование. –
напишите свой файл 'styles.xml' в вопрос .. – Ironman
@MikeM. Извините за формат. Я новичок в StackOverFlow. – SwagZ