title: Resources$NotFoundException: Resource ID #0x7f040015
body: <p>I am inflating R.id.itemView in order to add it to a gridLayout:</p>
  
  <pre><code>View item = getLayoutInflater().inflate(R.id.itemView,null);
  </code></pre>
  
  <p>However, I am getting this error when inflating it:</p>
  
  <pre><code>Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f040015 type #0x12 is not valid
  </code></pre>
  
  <p>That resource number corresponds to  itemView (I checked it on R.java).
  Here is the file where itemView is located (color_view.xml in res/layout):</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  xmlns:app="http://schemas.android.com/apk/res/com.example.colors"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:layout_gravity="center_horizontal"&gt;
  
      &lt;View
          android:id="@+id/itemView"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_margin="5dp"
          android:background="@drawable/color_shape" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I tried cleaning,building and deleting R.java but it doesnt solve the problem. What is the cause of this problem?</p>