[英]No resource identifier found for attribute 'menu' in package in Android
[英]No Resource Identifier found for attribute 'menu'
我試圖在我的應用程序中實現一個導航抽屜,但是當我嘗試引用我的'@ menu / navigationdraweritems'文件時,出現錯誤:
Error:(26) No resource identifier found for attribute 'menu' in package 'com.t99sdevelopment.centralized'
這是我的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>
也...
My gradle dependency: com.android.support:appcompat-v7:23.1.0
有什么想法嗎?
為了使android.support.design.widget.NavigationView
正常工作,您需要在build.gradle中添加設計依賴項:
compile 'com.android.support:design:23.1.0'
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.