Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You have set layout_height to wrap_content on the parent. Use this instead:</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" &gt; &lt;Button android:id="@+id/close" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="10.0dip" android:layout_marginRight="10.0dip" android:text="Exit" android:textSize="20.0dip" /&gt; &lt;RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" &gt; &lt;com.google.ads.AdView android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adSize="SMART_BANNER" ads:adUnitId="XXXXXX" ads:loadAdOnCreate="true" ads:testDevices="TEST_EMULATOR" &gt; &lt;/com.google.ads.AdView&gt; &lt;/RelativeLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p><strong>EDIT:</strong> You need to use code in your activity to load your app, according to <a href="https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals#android" rel="nofollow">https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals#android</a>:</p> <pre><code>AdView adView = (AdView)this.findViewById(R.id.adView); adView.loadAd(new AdRequest()); </code></pre> <p><strong>EDIT 2:</strong></p> <blockquote> <p>As usual you must replace MY_AD_UNIT_ID with your AdMob publisher ID. You must also add your own device ID in the ads:testDevices attribute to get test ads on your device.</p> </blockquote> <p>I was just assuming you were actually changing these values... yes you have to actually put values for these.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload