title: Failed to resolve attribute at index 0
body: <p>I'm stuck on a problem all this day and found no solution.</p>
  
  <p>The app runs good on 5.1, but on 6.1 it's crashing.</p>
  
  <p>I'm using 2 custom themes to change the app color for the type of user.</p>
  
  <p>Someone knows how to fix this?</p>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>FATAL EXCEPTION: main
  Process: ***.debug, PID: 7511
  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.***.qa.debug/com.***.activity.HomeActivity}: android.view.InflateException: Binary XML file line #23: Binary XML file line #5: Error inflating class &lt;unknown&gt;
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
  at android.app.ActivityThread.-wrap11(ActivityThread.java)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
  at android.os.Handler.dispatchMessage(Handler.java:102)
  at android.os.Looper.loop(Looper.java:148)
  at android.app.ActivityThread.main(ActivityThread.java:5417)
  at java.lang.reflect.Method.invoke(Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
  Caused by: android.view.InflateException: Binary XML file line #23: Binary XML file line #5: Error inflating class &lt;unknown&gt;
  at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
  at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393)
  at android.app.Activity.setContentView(Activity.java:2172)
  at com.***.activity.BaseActivity.onCreate(BaseActivity.java:54)
  at com.***.activity.BaseMenuActivity.onCreate(BaseMenuActivity.java:88)
  at com.***.activity.HomeActivity.onCreate(HomeActivity.java:87)
  at android.app.Activity.performCreate(Activity.java:6251)
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
  at android.app.ActivityThread.-wrap11(ActivityThread.java) 
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
  at android.os.Handler.dispatchMessage(Handler.java:102) 
  at android.os.Looper.loop(Looper.java:148) 
  at android.app.ActivityThread.main(ActivityThread.java:5417) 
  at java.lang.reflect.Method.invoke(Native Method) 
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
  Caused by: android.view.InflateException: Binary XML file line #5: Error inflating class &lt;unknown&gt;
  at android.view.LayoutInflater.createView(LayoutInflater.java:645)
  at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58)
  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694)
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762)
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
  at android.view.LayoutInflater.parseInclude(LayoutInflater.java:939)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:831)
  at android.view.LayoutInflater.parseInclude(LayoutInflater.java:939)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:831)
  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:838)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
  at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
  at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
  at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393) 
  at android.app.Activity.setContentView(Activity.java:2172) 
  at com.***.activity.BaseActivity.onCreate(BaseActivity.java:54) 
  at com.***.activity.BaseMenuActivity.onCreate(BaseMenuActivity.java:88) 
  at com.***.activity.HomeActivity.onCreate(HomeActivity.java:87) 
  at android.app.Activity.performCreate(Activity.java:6251) 
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) 
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) 
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
  at android.app.ActivityThread.-wrap11(ActivityThread.java) 
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
  at android.os.Handler.dispatchMessage(Handler.java:102) 
  at android.os.Looper.loop(Looper.java:148) 
  at android.app.ActivityThread.main(ActivityThread.java:5417) 
  at java.lang.reflect.Method.invoke(Native Method) 
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
  Caused by: java.lang.reflect.InvocationTargetException
  
  at java.lang.reflect.Constructor.newInstance(Native Method)
  at android.view.LayoutInflater.createView(LayoutInflater.java:619)
  at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58) 
  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694) 
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762) 
  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) 
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:835) 
  at android.view.LayoutInflater.parseInclude(LayoutInflater.java:939) 
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:831) 
  at android.view.LayoutInflater.parseInclude(LayoutInflater.java:939) 
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:831) 
  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:838) 
  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
  at android.view.LayoutInflater.rInflate(LayoutInflater.java:838) 
  at android.view.LayoutInflater.inflate(LayoutInflater.java:489) 
  at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
  at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
  at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393) 
  at android.app.Activity.setContentView(Activity.java:2172) 
  at com.***.activity.BaseActivity.onCreate(BaseActivity.java:54) 
  at com.***.activity.BaseMenuActivity.onCreate(BaseMenuActivity.java:88) 
  at com.***.activity.HomeActivity.onCreate(HomeActivity.java:87) 
  at android.app.Activity.performCreate(Activity.java:6251) 
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) 
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) 
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
  at android.app.ActivityThread.-wrap11(ActivityThread.java) 
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
  at android.os.Handler.dispatchMessage(Handler.java:102) 
  at android.os.Looper.loop(Looper.java:148) 
  at android.app.ActivityThread.main(ActivityThread.java:5417) 
  at java.lang.reflect.Method.invoke(Native Method) 
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
  Caused by: android.content.res.Resources$NotFoundException: File res/drawable/liner_layout_background.xml from drawable resource ID #0x7f0200fb
  at android.content.res.Resources.loadDrawableForCookie(Resources.java:2640)
  at android.content.res.Resources.loadDrawable(Resources.java:2540)
  at android.content.res.TypedArray.getDrawable(TypedArray.java:870)
  at android.view.View.&lt;init&gt;(View.java:3954)
  at android.view.ViewGroup.&lt;init&gt;(ViewGroup.java:573)
      at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:203)
          at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:199)
              at android.widget.LinearLayout.&lt;init&gt;(LinearLayout.java:195)
                  at java.lang.reflect.Constructor.newInstance(Native Method) 
                  at android.view.LayoutInflater.createView(LayoutInflater.java:619) 
                  at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58) 
                  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694) 
                  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762) 
                  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) 
                  at android.view.LayoutInflater.rInflate(LayoutInflater.java:835) 
                  at android.view.LayoutInflater.parseInclude(LayoutInflater.java:939) 
                  at android.view.LayoutInflater.rInflate(LayoutInflater.java:831) 
                  at android.view.LayoutInflater.parseInclude(LayoutInflater.java:939) 
                  at android.view.LayoutInflater.rInflate(LayoutInflater.java:831) 
                  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
                  at android.view.LayoutInflater.rInflate(LayoutInflater.java:838) 
                  at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
                  at android.view.LayoutInflater.rInflate(LayoutInflater.java:838) 
                  at android.view.LayoutInflater.inflate(LayoutInflater.java:489) 
                  at android.view.LayoutInflater.inflate(LayoutInflater.java:423) 
                  at android.view.LayoutInflater.inflate(LayoutInflater.java:374) 
                  at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393) 
                  at android.app.Activity.setContentView(Activity.java:2172) 
                  at com.***.activity.BaseActivity.onCreate(BaseActivity.java:54) 
                  at com.***.activity.BaseMenuActivity.onCreate(BaseMenuActivity.java:88) 
                  at com.***.activity.HomeActivity.onCreate(HomeActivity.java:87) 
                  at android.app.Activity.performCreate(Activity.java:6251) 
                  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) 
                  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) 
                  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
                  at android.app.ActivityThread.-wrap11(ActivityThread.java) 
                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                  at android.os.Looper.loop(Looper.java:148) 
                  at android.app.ActivityThread.main(ActivityThread.java:5417) 
                  at java.lang.reflect.Method.invoke(Native Method) 
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 
                  Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 0: TypedV
  </code></pre>
  
  <p><strong>linear_layout_background.xml</strong>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  
      &lt;item android:state_enabled="true" 
          android:state_pressed="true"
          android:drawable="@color/blue_light_line" /&gt;
  
      &lt;item android:state_enabled="true" 
          android:state_focused="true"
          android:drawable="@color/blue_light_line" /&gt;
  
      &lt;item android:state_enabled="true"
          android:drawable="?attr/list_row_bg" /&gt;
  
  &lt;/selector&gt;
  </code></pre>