title: Element shape doesn't have required attribute android:layout_height
body: <p>I'm using a shape element to put as the background of a view, doing as this <a href="https://stackoverflow.com/questions/16161448/how-to-make-layout-with-rounded-corners/16161493#16161493">SO question</a>. I'm using Android Studio and it tells me that...</p>
  
  <p><code>Element shape doesn't have required attribute android:layout_height</code></p>
  
  <p><code>Element shape doesn't have required attribute android:layout_width</code></p>
  
  <p>The code is as follows:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  
  &lt;solid android:color="@color/darkBrown"/&gt;
  &lt;stroke android:layout_width="match_parent" android:layout_height="match_parent"/&gt;
  &lt;corners android:radius="10dip"/&gt;
  &lt;padding android:left="0dip" android:right="0dip" android:top="0dip" android:bottom="0dip"/&gt;
  
  &lt;/shape&gt;
  </code></pre>
  
  <p>So basically my question: why do I get this error if shapes technically don't need these attributes? How can I tell android to stop marking it as an error or how can I avoid it?</p>
  
  <p>Thank you.</p>
  
  <p>SOLVED: The reason was because it wasn't inside the <code>drawable</code> folder.</p>
  
  <p>EDIT: Yes I'm aware the stroke part is incorrect.</p>