Note that there are some explanatory texts on larger screens.

plurals
  1. POonFailedToRecieveAd(Invalid Ad Request) message with AdMob
    text
    copied!<p>I've been trying to get AdMob to work for some time on my app. I keep getting onFailedToRecieveAd(Invalid Ad Request) message in the log. I've paired down my test application to this:</p> <pre><code> AdView adView; LinearLayout ll; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); adView = new AdView(this, AdSize.BANNER, "pub-2...............");//inserted my 16 digit pub id here adView.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL); ll = new LinearLayout(this); ll.setOrientation(LinearLayout.VERTICAL); ll.addView(adView); setContentView(ll); AdRequest adRequest = new AdRequest(); adRequest.addTestDevice("3...............");// 16 digits, tried other strings as // follows: //for addTestDevice I've tried several numbers, including the 16 digit device // number given me by my "device id" application, the "0123456789ABCDEF" device number // given by my console and device windows, the "CECE.........................." 32 digit // device number my logcat file told me to use in a logcat message, // "AdRequest.TEST_EMULATOR" // which an admob example in the docs said to use, "9774d56d682e549c" which another // admob docs example said to use. adView.loadAd(adRequest); </code></pre> <p>I've also tried adView.loadAd(new AdRequest()); using no device id as in another one of the google admob example apps.</p> <p>nothing has worked to show anything, it's not even creating space for the ad, just the onFailedToRecieveAd(Invalid Ad Request) message in the logcat</p> <p>I've also included the necessary permissions and "com.google.ads.AdActivity" in the manifest. </p>
 

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