title: Not enough space to show ad. Needs 320x50 dp, but only has 288x512 dp
body: <p>I have been trying to use admob for about 4 hours now, and am really stuck right now. I am getting:</p>
  
  <pre><code> Not enough space to show ad. Needs 320x50 dp, but only has 288x512 dp.
  </code></pre>
  
  <p>But, I think there is enough space. After all, the ad shows up in the design view of the layout. Can you please help me find out what is wrong? I have looked at the other 10 - 20 stack overflow pages, but it didn't help. </p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin"
      tools:context=".MainActivity"
      android:id="@+id/layout"
      android:background="#000000"
  
      xmlns:ads="http://schemas.android.com/apk/res-auto"&gt;
  
  
  &lt;LinearLayout android:layout_width="wrap_content"
          android:id="@+id/text_container"
          android:layout_height="wrap_content"
          android:layout_above="@+id/relativeLayout"
          android:layout_centerHorizontal="true"
          android:layout_marginBottom="58dp"&gt;
  
  
          &lt;TextView
  
              android:layout_width="match_parent"
              android:text="20:00"
              android:textSize="50sp"
              android:textColor="#fbfafa"
              android:layout_height="match_parent"
              android:textAppearance="?android:attr/textAppearanceLarge"
  
              android:id="@+id/timetext" /&gt;
  
  
      &lt;/LinearLayout&gt;
  
      &lt;RelativeLayout
          android:layout_width="wrap_content"
          android:layout_centerInParent="true"
          android:layout_height="wrap_content"
          android:id="@+id/relativeLayout"&gt;
  
      &lt;FrameLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerInParent="true"&gt;
  
          &lt;GridLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_gravity="center_horizontal|top"
              android:columnCount="4"
              android:rowCount="4"&gt;
  
              &lt;FrameLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentTop="true"
                  android:layout_toRightOf="@+id/textView"
                  android:id="@+id/frameLayout"
                  android:layout_gravity="left|center_vertical"
                  android:layout_row="0"
                  android:layout_column="0"&gt;
  
                  &lt;ImageButton
                      android:layout_width="75dp"
                      android:layout_height="75dp"
                      android:id="@+id/Blue"
                      android:layout_gravity="center_horizontal|top"
                      android:layout_alignParentTop="true"
                      android:layout_toRightOf="@+id/Red"
                      android:layout_toEndOf="@+id/Red"
                      android:background="@drawable/bluesquare"
                      android:onClick="onClick"/&gt;
              &lt;/FrameLayout&gt;
  
              &lt;FrameLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentTop="true"
                  android:layout_toRightOf="@+id/frameLayout"
                  android:layout_toEndOf="@+id/frameLayout"
                  android:id="@+id/frameLayout2"
                  android:layout_gravity="center"
                  android:layout_row="0"
                  android:layout_column="1"&gt;
  
                  &lt;ImageButton
                      android:layout_width="75dp"
                      android:layout_height="75dp"
                      android:id="@+id/Red"
                      android:layout_alignParentTop="true"
                      android:layout_toRightOf="@+id/frameLayout"
                      android:layout_toEndOf="@+id/frameLayout"
                      android:background="@drawable/redsquare"
                      android:onClick="onClick"/&gt;
              &lt;/FrameLayout&gt;
  
              &lt;FrameLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/frameLayout"
                  android:layout_alignParentLeft="true"
                  android:layout_alignParentStart="true"
                  android:id="@+id/frameLayout3"
                  android:layout_gravity="left|bottom"
                  android:layout_row="1"
                  android:layout_column="0"&gt;
  
                  &lt;ImageButton
                      android:layout_width="75dp"
                      android:layout_height="75dp"
                      android:id="@+id/Green"
                      android:layout_below="@+id/frameLayout"
                      android:layout_alignParentLeft="true"
                      android:layout_alignParentStart="true"
                      android:background="@drawable/greensquare"
                      android:onClick="onClick"/&gt;
              &lt;/FrameLayout&gt;
  
              &lt;FrameLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignTop="@+id/frameLayout3"
                  android:layout_toRightOf="@+id/frameLayout"
                  android:layout_toEndOf="@+id/frameLayout"
                  android:id="@+id/frameLayout4"
                  android:layout_gravity="center_horizontal|bottom"
                  android:layout_row="1"
                  android:layout_column="1"&gt;
  
                  &lt;ImageButton
                      android:layout_width="75dp"
                      android:layout_height="75dp"
                      android:id="@+id/Purple"
                      android:layout_alignBottom="@+id/Green"
                      android:layout_centerHorizontal="true"
                      android:background="@drawable/purplesquare"
                      android:onClick="onClick"/&gt;
              &lt;/FrameLayout&gt;
  
              &lt;FrameLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentTop="true"
                  android:layout_toRightOf="@+id/frameLayout"
                  android:layout_toEndOf="@+id/frameLayout"
                  android:id="@+id/framelayout5"
                  android:layout_gravity="center"
                  android:layout_row="2"
                  android:layout_column="3"&gt;
  
                  &lt;ImageButton
                      android:layout_width="75dp"
                      android:layout_height="75dp"
                      android:id="@+id/Brown"
                      android:layout_alignParentTop="true"
                      android:layout_toRightOf="@+id/frameLayout"
                      android:layout_toEndOf="@+id/frameLayout"
                      android:background="@drawable/brownsquare"
                      android:onClick="onClick"/&gt;
              &lt;/FrameLayout&gt;
  
              &lt;FrameLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentTop="true"
                  android:layout_toRightOf="@+id/frameLayout"
                  android:layout_toEndOf="@+id/frameLayout"
                  android:id="@+id/frameLayout6"
                  android:layout_gravity="center"
                  android:layout_row="1"
                  android:layout_column="3"&gt;
  
                  &lt;ImageButton
                      android:layout_width="75dp"
                      android:layout_height="75dp"
                      android:id="@+id/Pink"
                      android:layout_alignParentTop="true"
                      android:layout_toRightOf="@+id/frameLayout"
                      android:layout_toEndOf="@+id/frameLayout"
                      android:background="@drawable/pinksquare"
                      android:onClick="onClick"/&gt;
              &lt;/FrameLayout&gt;
  
              &lt;FrameLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentTop="true"
                  android:layout_toRightOf="@+id/frameLayout"
                  android:layout_toEndOf="@+id/frameLayout"
                  android:id="@+id/framelayout7"
                  android:layout_gravity="center"
                  android:layout_row="0"
                  android:layout_column="3"&gt;
  
                  &lt;ImageButton
                      android:layout_width="75dp"
                      android:layout_height="75dp"
                      android:id="@+id/Yellow"
                      android:layout_alignParentTop="true"
                      android:layout_toRightOf="@+id/frameLayout"
                      android:layout_toEndOf="@+id/frameLayout"
                      android:background="@drawable/yellowsquare"
                      android:onClick="onClick"/&gt;
              &lt;/FrameLayout&gt;
  
              &lt;FrameLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentTop="true"
                  android:layout_toRightOf="@+id/frameLayout"
                  android:layout_toEndOf="@+id/frameLayout"
                  android:id="@+id/framelayout8"
                  android:layout_gravity="center"
                  android:layout_row="2"
                  android:layout_column="0"&gt;
  
                  &lt;ImageButton
                      android:layout_width="75dp"
                      android:layout_height="75dp"
                      android:id="@+id/Peach"
                      android:layout_alignParentTop="true"
                      android:layout_toRightOf="@+id/frameLayout"
                      android:layout_toEndOf="@+id/frameLayout"
                      android:background="@drawable/peachsquare"
                      android:onClick="onClick"/&gt;
              &lt;/FrameLayout&gt;
  
              &lt;FrameLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignParentTop="true"
                  android:layout_toRightOf="@+id/frameLayout"
                  android:layout_toEndOf="@+id/frameLayout"
                  android:id="@+id/framelayout9"
                  android:layout_gravity="center"
                  android:layout_row="2"
                  android:layout_column="1"&gt;
  
                  &lt;ImageButton
                      android:layout_width="75dp"
                      android:layout_height="75dp"
                      android:id="@+id/Grey"
                      android:layout_alignParentTop="true"
                      android:layout_toRightOf="@+id/frameLayout"
                      android:layout_toEndOf="@+id/frameLayout"
                      android:background="@drawable/greysquare"
                      android:onClick="onClick"/&gt;
              &lt;/FrameLayout&gt;
  
          &lt;/GridLayout&gt;
      &lt;/FrameLayout&gt;
  
  &lt;/RelativeLayout&gt;
  
      &lt;com.google.android.gms.ads.AdView
          android:id="@+id/adView"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          ads:adUnitId="@string/banner_ad_unit_id"
          ads:adSize="BANNER"/&gt;
  
      &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Why is there not enough space?</p>
  
  <p>Thanks so much</p>