title: android.support.design.widget.NavigationView inflation issues (target api 23, min api 10)
body: <p>I am using eclipse and was previously using just android-support-v7-appcompt fine.  Targetting API 23 with min API 10.  I wanted to start update some of the UI so I grabbed the android-support-design library and decided to start with a NavigationView following along here (<a href="http://www.android4devs.com/2015/06/navigation-view-material-design-support.html" rel="nofollow">http://www.android4devs.com/2015/06/navigation-view-material-design-support.html</a> ).  </p>
  
  <p>At first I was getting errors during inflation of of my main activity android.support.design.widget.NavigationView as it couldn't find a resource as I had the android.support.design library not targeting API 23.  I fixed that and now I'm at my latest error still during the same inflation which looks like it can't find android.support.design.internal.NavigationMenuView .</p>
  
  <p>This is in the emulator running API 19 (api 23 intel emulator doesn't load for me last I tried).  I've added a bunch to pro-guard in all the projects (design, appcompat, my base library with my ndk/java mix code, top level project which builds my apk so I can have different apk's based on my data.</p>
  
  <p>This has resulted many hours lost the last two days for no gain so far.  Both support libraries are up to date as of yesterday.  I'm still using eclipse as when I tried to convert to Android Studio months ago it ruined my entire directory structure and wouldn't build all my ndk libraries (there are a few) so I don't have time to look into Android Studio for a little while, not that it would help me here I assume.</p>
  
  <p>My main activities start:</p>
  
  <pre><code>@Override
  protected void onCreate(Bundle savedInstanceState) {
  
      super.onCreate(savedInstanceState);
      try{
      setContentView(R.layout.activity_main);
      }
      catch (Exception e) {
          e.printStackTrace();
      }
  ....
  </code></pre>
  
  <p>Here is the printout of the stack trace caught</p>
  
  <pre><code>11-22 15:01:30.394: W/dalvikvm(4312): Unable to resolve superclass of Landroid/support/design/internal/NavigationMenuView; (1893)
  11-22 15:01:30.394: W/dalvikvm(4312): Link of class 'Landroid/support/design/internal/NavigationMenuView;' failed
  11-22 15:01:30.824: W/System.err(4244): android.view.InflateException: Binary XML file line #28: Error inflating class android.support.design.widget.NavigationView
  11-22 15:01:30.824: W/System.err(4244):     at android.view.LayoutInflater.createView(LayoutInflater.java:621)
  11-22 15:01:30.824: W/System.err(4244):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
  11-22 15:01:30.824: W/System.err(4244):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:756)
  11-22 15:01:30.824: W/System.err(4244):     at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
  11-22 15:01:30.824: W/System.err(4244):     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
  11-22 15:01:30.824: W/System.err(4244):     at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
  11-22 15:01:30.824: W/System.err(4244):     at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256)
  11-22 15:01:30.824: W/System.err(4244):     at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
  11-22 15:01:30.824: W/System.err(4244):     at com.company.app.MainActivity.onCreate(MainActivity.java:68)
  11-22 15:01:30.824: W/System.err(4244):     at android.app.Activity.performCreate(Activity.java:5231)
  11-22 15:01:30.824: W/System.err(4244):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
  11-22 15:01:30.824: W/System.err(4244):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
  11-22 15:01:30.824: W/System.err(4244):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
  11-22 15:01:30.824: W/System.err(4244):     at android.app.ActivityThread.access$800(ActivityThread.java:135)
  11-22 15:01:30.824: W/System.err(4244):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
  11-22 15:01:30.824: W/System.err(4244):     at android.os.Handler.dispatchMessage(Handler.java:102)
  11-22 15:01:30.824: W/System.err(4244):     at android.os.Looper.loop(Looper.java:136)
  11-22 15:01:30.824: W/System.err(4244):     at android.app.ActivityThread.main(ActivityThread.java:5017)
  11-22 15:01:30.824: W/System.err(4244):     at java.lang.reflect.Method.invokeNative(Native Method)
  11-22 15:01:30.824: W/System.err(4244):     at java.lang.reflect.Method.invoke(Method.java:515)
  11-22 15:01:30.824: W/System.err(4244):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
  11-22 15:01:30.824: W/System.err(4244):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
  11-22 15:01:30.824: W/System.err(4244):     at dalvik.system.NativeStart.main(Native Method)
  11-22 15:01:30.824: W/System.err(4244): Caused by: java.lang.reflect.InvocationTargetException
  11-22 15:01:30.824: W/System.err(4244):     at java.lang.reflect.Constructor.constructNative(Native Method)
  11-22 15:01:30.824: W/System.err(4244):     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
  11-22 15:01:30.824: W/System.err(4244):     at android.view.LayoutInflater.createView(LayoutInflater.java:595)
  11-22 15:01:30.824: W/System.err(4244):     ... 22 more
  11-22 15:01:30.824: W/System.err(4244): Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class android.support.design.internal.NavigationMenuView
  11-22 15:01:30.824: W/System.err(4244):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:708)
  11-22 15:01:30.824: W/System.err(4244):     at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
  11-22 15:01:30.824: W/System.err(4244):     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
  11-22 15:01:30.824: W/System.err(4244):     at android.support.design.internal.NavigationMenuPresenter.getMenuView(NavigationMenuPresenter.java:97)
  11-22 15:01:30.824: W/System.err(4244):     at android.support.design.widget.NavigationView.&lt;init&gt;(NavigationView.java:165)
  11-22 15:01:30.824: W/System.err(4244):     at android.support.design.widget.NavigationView.&lt;init&gt;(NavigationView.java:94)
  11-22 15:01:30.824: W/System.err(4244):     ... 25 more
  11-22 15:01:30.824: W/System.err(4244): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.design.internal.NavigationMenuView" on path: DexPathList[[zip file "/data/app/com.company.&lt;app&gt;.nyc-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.company.app.nyc-2, /vendor/lib, /system/lib]]
  11-22 15:01:30.824: W/System.err(4244):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
  11-22 15:01:30.824: W/System.err(4244):     at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
  11-22 15:01:30.824: W/System.err(4244):     at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
  11-22 15:01:30.834: W/System.err(4244):     at android.view.LayoutInflater.createView(LayoutInflater.java:559)
  11-22 15:01:30.834: W/System.err(4244):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
  11-22 15:01:30.834: W/System.err(4244):     ... 30 more
  </code></pre>
  
  <p>res/values/styles.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  &lt;style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"&gt;
      &lt;item name="colorPrimary"&gt;@color/primary&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/primaryDark&lt;/item&gt;
      &lt;item name="colorAccent"&gt;@color/accent&lt;/item&gt;
      &lt;item name="divider"&gt;@color/divider&lt;/item&gt;
      &lt;item name="windowNoTitle"&gt;true&lt;/item&gt;
  &lt;/style&gt;
  
  
  &lt;style name="SceneTheme" parent="AppTheme" &gt;
      &lt;item name="android:typeface"&gt;monospace&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="MenuTheme" parent="AppTheme" &gt;
      &lt;item name="android:typeface"&gt;monospace&lt;/item&gt;
      &lt;item name="android:textSize"&gt;12sp&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p>res/values-v21</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  
  &lt;style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"&gt;
  
      &lt;item name="android:colorPrimary"&gt;@color/primary&lt;/item&gt;
      &lt;item name="android:colorPrimaryDark"&gt;@color/primaryDark&lt;/item&gt;
      &lt;item name="android:statusBarColor"&gt;@color/primary&lt;/item&gt;
  
  &lt;/style&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p>Main Activty xml</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:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.company.app.MainActivity" &gt;
  
  &lt;LinearLayout
      android:layout_height="match_parent"
      android:layout_width="match_parent"
      android:orientation="vertical"
      &gt;
      &lt;include
          android:id="@+id/toolbar"
          layout="@layout/toolbar_main"
      /&gt;
      &lt;FrameLayout
          android:id="@+id/fragment_container"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
      &lt;/FrameLayout&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;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/header_navbar"
      app:menu="@menu/action_navbar" /&gt;
  
  &lt;fragment
      android:id="@+id/location_drawer"
      android:name="com.company.app.LocationDrawerFragment"
      android:layout_width="wrap_content"
      android:layout_height="match_parent" 
      android:layout_gravity="end" /&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>proguard.project.txt file i'm using in all projects</p>
  
  <pre><code>-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod
  
  -dontobfuscate
  -dontoptimize
  -allowaccessmodification
  -repackageclasses ''
  
  -keep class com.company.** { *; }
  -keep class android.support.v4.app.** { *; }
  -keep interface android.support.v4.app.** { *; }
  
  -keep class android.support.v7.app.** { *; }
  -keep interface android.support.v7.app.** { *; }
  
  -keep class android.support.v13.app.** { *; }
  -keep interface android.support.v13.app.** { *; }
  
  -keep class android.support.design.** { *; }
  -keep class android.support.design.** { *; }
  </code></pre>