android.view.InflateException: Binary XML file line #158: Error inflating class Button
<p>I want to use <code>color.xml</code> file for my button, but it show this error and app crash. It says, it cannot find the <code>color.xml</code> file.</p>

<pre><code>Caused by: android.content.res.Resources$NotFoundException: File res/color/color.xml from drawable resource ID #0x7f0e00dd
  at android.content.res.Resources.loadDrawableForCookie(Resources.java:3783)
  at android.content.res.Resources.loadDrawable(Resources.java:3651)
  at android.content.res.TypedArray.getDrawable(TypedArray.java:762)
  at android.view.View.&lt;init&gt;(View.java:3983)
  at android.widget.TextView.&lt;init&gt;(TextView.java:1021)
  at android.widget.Button.&lt;init&gt;(Button.java:115)
  at android.widget.Button.&lt;init&gt;(Button.java:108)
  at android.support.v7.widget.AppCompatButton.&lt;init&gt;(AppCompatButton.java:62)
  at android.support.v7.widget.AppCompatButton.&lt;init&gt;(AppCompatButton.java:5
</code></pre>

<p><strong>Here is my button xml:</strong></p>

<pre><code>&lt;Button
    android:id="@+id/btn_buy"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="5dp"
    android:background="@color/color"
    android:textColor="@color/mdtp_white"
    android:text="@string/buy"/&gt;
</code></pre>

<p><strong>This is my color.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="false" android:color="@color/grey" /&gt;
    &lt;item android:color="@color/myRedColor"/&gt;
&lt;/selector&gt;
</code></pre>