title: android inflate exception
body: <p>I want to create a layout for my android application using inheritance i.e. every screen will have the same background and header.</p>
  
  <p>The layout with that background and header is specified like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;merge xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
      &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="25dp"
      android:background="@drawable/background"
      android:orientation="vertical" &gt;
  
      &lt;TextView
          android:id="@+id/headerLabel"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center"
          android:layout_marginTop="2dp"
          android:text="@string/app_name"
          android:textAppearance="?android:attr/textAppearanceMedium"
          android:textColor="@string/ColorLabel" /&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;/merge&gt;
  </code></pre>
  
  <p>While a specific screen, the login screen, looks like this:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;merge xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
  &lt;LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
      &lt;include
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          layout="@layout/background" /&gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_gravity="center_horizontal"
          android:layout_marginTop="50dp"
          android:orientation="vertical" &gt;
  
          &lt;TextView
              android:id="@+id/username_label"
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_weight="1"
              android:text="@string/Username"
              android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
          &lt;EditText
              android:id="@+id/username_box"
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_weight="1"
              android:ems="10"
              android:inputType="text" &gt;
  
              &lt;requestFocus /&gt;
          &lt;/EditText&gt;
  
          &lt;TextView
              android:id="@+id/password_label"
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_marginTop="10dp"
              android:layout_weight="1"
              android:text="@string/Password"
              android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
          &lt;EditText
              android:id="@+id/password_box"
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_weight="1"
              android:ems="10"
              android:inputType="textPassword" /&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_gravity="fill"
              android:layout_marginTop="10dp"
              android:layout_weight="1"
              android:gravity="center_vertical"
              android:weightSum="2" &gt;
  
              &lt;Button
                  android:id="@+id/login_button"
                  android:layout_width="100dp"
                  android:layout_height="wrap_content"
                  android:layout_gravity="center|left"
                  android:layout_marginRight="20dp"
                  android:background="@drawable/background"
                  android:text="@string/Login"
                  android:textColor="@string/ColorLabel" /&gt;
  
              &lt;Button
                  android:id="@+id/register_button"
                  android:layout_width="100dp"
                  android:layout_height="wrap_content"
                  android:layout_gravity="right"
                  android:background="@drawable/background"
                  android:text="@string/Register"
                  android:textColor="@string/ColorLabel" /&gt;
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  
  &lt;/merge&gt;
  </code></pre>
  
  <p>When I want to run this code, it causes an error: </p>
  
  <pre><code>10-05 17:10:11.620: D/AndroidRuntime(25222): Shutting down VM
  10-05 17:10:11.623: W/dalvikvm(25222): threadid=1: thread exiting with uncaught exception (group=0x40015578)
  10-05 17:10:11.635: E/AndroidRuntime(25222): FATAL EXCEPTION: main
  10-05 17:10:11.635: E/AndroidRuntime(25222): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.shopassistent/com.shopassistent.Login_Activity}: android.view.InflateException: Binary XML file line #9: Error inflating class &lt;unknown&gt;
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.app.ActivityThread.access$1500(ActivityThread.java:117)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.os.Handler.dispatchMessage(Handler.java:99)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.os.Looper.loop(Looper.java:123)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.app.ActivityThread.main(ActivityThread.java:3687)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at java.lang.reflect.Method.invokeNative(Native Method)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at java.lang.reflect.Method.invoke(Method.java:507)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at dalvik.system.NativeStart.main(Native Method)
  10-05 17:10:11.635: E/AndroidRuntime(25222): Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class &lt;unknown&gt;
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.view.LayoutInflater.createView(LayoutInflater.java:518)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.view.LayoutInflater.parseInclude(LayoutInflater.java:682)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:619)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.view.LayoutInflater.inflate(LayoutInflater.java:383)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:209)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.app.Activity.setContentView(Activity.java:1657)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at com.shopassistent.Login_Activity.onCreate(Login_Activity.java:12)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    ... 11 more
  10-05 17:10:11.635: E/AndroidRuntime(25222): Caused by: java.lang.reflect.InvocationTargetException
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at java.lang.reflect.Constructor.constructNative(Native Method)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.view.LayoutInflater.createView(LayoutInflater.java:505)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    ... 26 more
  10-05 17:10:11.635: E/AndroidRuntime(25222): Caused by: android.content.res.Resources$NotFoundException: File #ffffff from drawable resource ID #0x7f040009: .xml extension required
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.content.res.Resources.loadColorStateList(Resources.java:1824)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.content.res.TypedArray.getColorStateList(TypedArray.java:342)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.widget.TextView.&lt;init&gt;(TextView.java:677)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    at android.widget.TextView.&lt;init&gt;(TextView.java:369)
  10-05 17:10:11.635: E/AndroidRuntime(25222):    ... 29 more
  </code></pre>
  
  <p>Can anybody see where this error comes from?</p>