Reputation: 529
I'm trying to implement a navigation drawer into my app, but when I try to reference my '@menu/navigationdraweritems' file, I get the error:
Error:(26) No resource identifier found for attribute 'menu' in package 'com.t99sdevelopment.centralized'
Here's my XML...
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
layout="@layout/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@+id/flContent"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<android.support.design.widget.NavigationView
android:id="@+id/nvView"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="@android:color/white"
app:menu="@menu/navigationdraweritems" />
</android.support.v4.widget.DrawerLayout>
Also...
My gradle dependency: com.android.support:appcompat-v7:23.1.0
Any thoughts?
Upvotes: 1
Views: 8018
Reputation: 597
For android.support.design.widget.NavigationView
to work, you need to add the design dependency in you build.gradle:
compile 'com.android.support:design:23.1.0'
Upvotes: 12