title: Android error: You must specifiy a valid layout reference. The layout ID. in elcipse
body: <p>I have been working with elcipse for a couple of weeks now. My code has functioned properly but all of a sudden it has stopped working. I get this error,</p>
  
  <p>main.xml: You must specifiy a valid layout reference. The layout ID @layout/required is not valid.</p>
  
  <p>my XML code</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" &gt;
  
  
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="vertical"&gt;
  
  
      &lt;!--  select between BIN or auction --&gt;
      &lt;LinearLayout
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:gravity="center_horizontal"
          android:orientation="horizontal" &gt;
  
      &lt;Button
          android:id="@+id/AuctionButton"
          android:layout_marginLeft="82dp"
          android:layout_width="119dp"
          android:layout_height="wrap_content"
          android:onClick="showAuctionOptions"
          android:text="Auction" /&gt;
  
  
      &lt;Button
          android:id="@+id/BINButton"
          android:layout_marginLeft="-2dp"
          android:layout_width="119dp"
          android:layout_height="wrap_content"
          android:onClick="showAuctionOptions"
          android:text="Buy it now" /&gt;
  
      &lt;/LinearLayout&gt;
  
          &lt;include android:id="@+id/cell1" layout="@layout/required"/&gt;
  
          &lt;include android:id="@+id/cell2"  layout="@layout/gray_line" /&gt;
  
          &lt;!--**  Show if Buy it now is selected **--&gt;
          &lt;include android:id="@+id/cell3" layout="@layout/buyitnow" /&gt;
          &lt;!-- ** End Buy it now display ** --&gt;
  
          &lt;!--** Show if auction selected ** --&gt;
          &lt;include android:id="@+id/cell4" layout="@layout/auction" /&gt;
  
          &lt;include android:id="@+id/cell5"  layout="@layout/gray_line" /&gt;
  
          &lt;include android:id="@+id/cell6" layout="@layout/addons" /&gt;
  
          &lt;include android:id="@+id/cell7" layout="@layout/calculate" /&gt;      
  
  &lt;/LinearLayout&gt;
  
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>the error is with the first include, however if I remove that, I just get an error with the second include. If I remove all of the include, I get a 'could not resolve R' error within my java code.</p>
  
  <p>What I have tried,</p>
  
  <ul>
  <li>cleaning the project </li>
  <li>restarting eclipse</li>
  <li>rebooting my computer</li>
  </ul>
  
  <p>this is my AndroidManifest XML file,</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="toggler.state"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk android:minSdkVersion="10" /&gt;
  
      &lt;application
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"&gt;
          &lt;activity
              android:name=".TogglerActivity"
              android:label="@string/app_name"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>none of which have worked.Could anyone help please?</p>
  
  <p>Thanks</p>