title: Error inflating class android.support.design.widget.NavigationView
body: <p>I followed a tutorial of  NavigationView and can't get through this error message :</p>
  
  <pre><code> Error inflating class android.support.design.widget.NavigationView
  </code></pre>
  
  <p>Tutorial link: <a href="https://www.youtube.com/watch?v=mtOztjHmM0c" rel="nofollow noreferrer">https://www.youtube.com/watch?v=mtOztjHmM0c</a></p>
  
  <p>I tried every solution given to this question on stackoverflow from here:
  <a href="https://stackoverflow.com/questions/30709419/error-inflating-class-android-support-design-widget-navigationview">Error inflating class android.support.design.widget.NavigationView</a></p>
  
  <p>but the error message still exists</p>
  
  <p><strong>activity_main.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;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:layout_width="match_parent"
  android:layout_height="match_parent"
  
  tools:context="com.mandeepsinghshekhawat95gmail.moneymemo.MainActivity"&gt;
  &lt;LinearLayout
      android:layout_height="match_parent"
      android:layout_width="match_parent"
      android:orientation="vertical"
  
      &gt;
      &lt;include
          android:layout_height="wrap_content"
          android:layout_width="match_parent"
          layout="@layout/toolbar_layout"
          /&gt;
  &lt;/LinearLayout&gt;
  
  &lt;android.support.design.widget.NavigationView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/navigation_view"
      android:layout_gravity="start"
      app:menu="@menu/drawer_menu"
      /&gt;
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p><strong>build.gradle</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  compileSdkVersion 23
  buildToolsVersion "23.0.3"
  
  defaultConfig {
      applicationId "com.mandeepsinghshekhawat95gmail.moneymemo"
      minSdkVersion 21
      targetSdkVersion 23
      versionCode 1
      versionName "1.0"
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  }
  
  dependencies {
     compile fileTree(dir: 'libs', include: ['*.jar'])
     testCompile 'junit:junit:4.12'
     compile 'com.android.support:appcompat-v7:23.3.0'
     compile 'com.android.support:design:23.3.0'
  }
  </code></pre>
  
  <p><strong>Project build.gradle</strong></p>
  
  <pre><code>buildscript {
  repositories {
      jcenter()
  }
  dependencies {
      classpath 'com.android.tools.build:gradle:2.0.0'
  
      // NOTE: Do not place your application dependencies here; they belong
      // in the individual module build.gradle files
  }
  }
  
  allprojects {
     repositories {
         jcenter()
      }
    }
  
   task clean(type: Delete) {
    delete rootProject.buildDir
  }
  </code></pre>
  
  <p><strong>styles.xml</strong></p>
  
  <pre><code>&lt;resources&gt;
  
  &lt;!-- Base application theme. --&gt;
  &lt;style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"&gt;
      &lt;!-- Customize your theme here. --&gt;
      &lt;item name="colorPrimary"&gt;@color/colorPrimary&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/colorPrimaryDark&lt;/item&gt;
      &lt;item name="colorAccent"&gt;@color/colorAccent&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>drawer_menu.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;group android:checkableBehavior="single"&gt;
  
      &lt;item
      android:id="@+id/home_id"
      android:title="Home"
      android:icon="@drawable/home"
      &gt;&lt;/item&gt;
      &lt;item
          android:id="@+id/id_message"
          android:title="Message"
          android:icon="@drawable/message"
          &gt;&lt;/item&gt;
      &lt;item
          android:id="@+id/id_settings"
          android:title="Home"
          android:icon="@drawable/settings"
          &gt;&lt;/item&gt;
  &lt;/group&gt;
  
  &lt;item android:title="Social"
      &gt;
  
      &lt;menu&gt;
          &lt;item android:title="Add to Group"
              android:id="@+id/add_to_group"
              android:icon="@drawable/person"
              &gt;&lt;/item&gt;
          &lt;item android:title="Group"
              android:id="@+id/id_group"
              android:icon="@drawable/group"
              &gt;&lt;/item&gt;
          &lt;item android:title="Share"
              android:id="@+id/share"
              android:icon="@drawable/share"
              &gt;&lt;/item&gt;
      &lt;/menu&gt;
  &lt;/item&gt;
   &lt;/menu&gt;
  </code></pre>
  
  <p><strong>toolbar_layout.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v7.widget.Toolbar
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:layout_width="match_parent" android:layout_height="wrap_content"
  android:id="@+id/toolbar"
  android:background="?attr/colorPrimaryDark"
  android:minHeight="?attr/actionBarSize"
  android:fitsSystemWindows="true"
  app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
  &gt;
  
  &lt;/android.support.v7.widget.Toolbar&gt;
  </code></pre>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>package com.mandeepsinghshekhawat95gmail.moneymemo;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.support.v7.widget.Toolbar;
  
  public class MainActivity extends AppCompatActivity {
  
  Toolbar toolbar;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      toolbar=(Toolbar)findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
   }
  }
  </code></pre>
  
  <p><strong>StackTrace</strong></p>
  
  <pre><code> java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mandeepsinghshekhawat95gmail.moneymemo/com.mandeepsinghshekhawat95gmail.moneymemo.MainActivity}: android.view.InflateException: Binary XML file line #23: Error inflating class android.support.design.widget.NavigationView
                                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2339)
                                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413)
                                                                                              at android.app.ActivityThread.access$800(ActivityThread.java:155)
                                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
                                                                                              at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                              at android.os.Looper.loop(Looper.java:135)
                                                                                              at android.app.ActivityThread.main(ActivityThread.java:5343)
                                                                                              at java.lang.reflect.Method.invoke(Native Method)
                                                                                              at java.lang.reflect.Method.invoke(Method.java:372)
                                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
                                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:702)
                                                                                           Caused by: android.view.InflateException: Binary XML file line #23: Error inflating class android.support.design.widget.NavigationView
                                                                                              at android.view.LayoutInflater.createView(LayoutInflater.java:633)
                                                                                              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
                                                                                              at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
                                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
                                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
                                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
                                                                                              at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)
                                                                                              at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:136)
                                                                                              at com.mandeepsinghshekhawat95gmail.moneymemo.MainActivity.onCreate(MainActivity.java:13)
                                                                                              at android.app.Activity.performCreate(Activity.java:6010)
                                                                                              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129)
                                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292)
                                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413) 
                                                                                              at android.app.ActivityThread.access$800(ActivityThread.java:155) 
                                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317) 
                                                                                              at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                              at android.os.Looper.loop(Looper.java:135) 
                                                                                              at android.app.ActivityThread.main(ActivityThread.java:5343) 
                                                                                              at java.lang.reflect.Method.invoke(Native Method) 
                                                                                              at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907) 
                                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:702) 
                                                                                           Caused by: java.lang.reflect.InvocationTargetException
                                                                                              at java.lang.reflect.Constructor.newInstance(Native Method)
                                                                                              at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
                                                                                              at android.view.LayoutInflater.createView(LayoutInflater.java:607)
                                                                                              at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) 
                                                                                              at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) 
                                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:504) 
                                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:414) 
                                                                                              at android.view.LayoutInflater.inflate(LayoutInflater.java:365) 
                                                                                              at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276) 
                                                                                              at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:136) 
                                                                                              at com.mandeepsinghshekhawat95gmail.moneymemo.MainActivity.onCreate(MainActivity.java:13) 
                                                                                              at android.app.Activity.performCreate(Activity.java:6010) 
                                                                                              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129) 
                                                                                              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292) 
                                                                                              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413) 
                                                                                              at android.app.ActivityThread.access$800(ActivityThread.java:155) 
                                                                                              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317) 
                                                                                              at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                              at android.os.Looper.loop(Looper.java:135) 
                                                                                              at android.app.ActivityThread.main(ActivityThread.java:5343) 
                                                                                              at java.lang.reflect.Method.invoke(Native Method) 
                                                                                              at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907) 
                                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:702) 
                                                                                           Caused by: java.lang.OutOfMemoryError: Failed to allocate a 216000012 byte allocation with 16777216 free bytes and 95MB until OOM
                                                                                              at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
                                                                                              at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
                                                                                              at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:609)
                                                                                              at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
                                                                                              at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:988)
                                                                                              at android.content.res.Resources.loadDrawableForCookie(Resources.java:2477)
                                                                                              at android.content.res.Resources.loadDrawable(Resources.java:2384)
                                                                                              at android.content.res.Resources.getDrawable(Resources.java:787)
                                                                                              at android.content.Context.getDrawable(Context.java:403)
                                                                                              at android.support.v4.content.ContextCompatApi21.getDrawable(ContextCompatApi21.java:26)
                                                                                              at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:321)
                                                                                              at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:201)
                                                                                              at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:191)
                                                                                              at android.support.v7.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:421)
                                                                                              at android.support.design.internal.NavigationMenuPresenter$NavigationMenuAdapter.appendTransparentIconIfMissing(NavigationMenuPresenter.java:519)
                                                                                              at android.support.design.internal.NavigationMenuPresenter$NavigationMenuAdapter.prepareMenuItems(NavigationMenuPresenter.java:488)
                                                                                              at android.support.design.internal.NavigationMenuPresenter$NavigationMenuAdapter.update(NavigationMenuPresenter.java:436)
                                                                                              at android.support.design.internal
  </code></pre>