0

I am creating an app with material design I'm getting this error when I'm implement NavigationView in MainActivity.xml:

java.lang.ClassNotFoundException: android.support.v7.internal.view.menu.MenuBuilder$Callbac

Here my layout file:

<?xml version="1.0" encoding="utf-8"?>

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main_activity_DrawerLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context=".MainActivity">


    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#7C4DFF">


        <include
            android:id="@+id/app_bar"
            layout="@layout/app_bar" />

        <FrameLayout
            android:id="@+id/frame"
            android:layout_width="match_parent"
            android:layout_height="match_parent"></FrameLayout>

        <TextView
            android:id="@+id/text_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="@string/Left"
            android:textColor="#FFC107" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/text_view"
            android:layout_centerInParent="true"
            android:text="@string/right"
            android:textColor="#FF9800" />
    </RelativeLayout>

    <ListView
        android:id="@+id/left_drawer"
        android:layout_width="240dp"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:background="#FFC107"></ListView>

    <ExpandableListView
        android:id="@+id/right_drawer"
        android:layout_width="240dp"
        android:layout_height="fill_parent"
        android:layout_gravity="end"
        android:background="#FF9800"/>

    <android.support.design.widget.NavigationView
        android:id="@+id/navigation_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        app:headerLayout="@layout/navheader"
        app:menu="@menu/drawer_item" />





</android.support.v4.widget.DrawerLayout>
rajeev
  • 122
  • 1
  • 1
  • 9

1 Answers1

0

I got this problem solved by updating android studio

rajeev
  • 122
  • 1
  • 1
  • 9