Publisher ID vs. MY_AD_UNIT_ID, AdMob, Android

2019-07-17 04:48发布

问题:

i am confused.

  1. I created my AdMob account, with Publisher Id: pub-2fffdddcccyyyxxx
  2. I didn't add my app to AdMob yet, I would only test how it works
  3. I have been follow: https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals?hl=en#android

I added:

  AdRequest adRequest = new AdRequest();
    adRequest.addTestDevice(AdRequest.TEST_EMULATOR);  
    adRequest.addTestDevice("F08D35F3334039343254AD3A83ED11B5");  
     adView.loadAd(adRequest);
  1. Now, I really don't know what is MY_AD_UNIT_ID from https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals?hl=en#android Publisher Id or "market://details?id=com.your.packagename"?
  2. I tried two ways: "pub-2fffdddcccyyyxxx" from AdMob and "market://details?id=com.your.packagename"
  3. I always get the answer: Invalid unknown request error: Cannot determine request type. Is your ad unit id correct? D/webviewglue(16784): nativeDestroy view: 0x4d98e8 onFailedToReceiveAd(Invalid Ad request.)

What am I doing wrong? Do you have any idea?

Thanks for help!

回答1:

you have to add an app--site to the admob console, then you will get the specific Publisher ID: for that specific app-site which refers to the MY_AD_UNIT_ID that you use in your actual program



回答2:

I Solve this problem follow this instructions link to tutorial



标签: android admob