Reputation: 1382
It's pretty simple question but i am not getting the exact answer why is the ad not loading. White blank banner is shown with no ad inside it. Is it the problem related to ad unit id or app being running on debug or release mode. I am pretty sure about the code i have used in my app because i have played with admob in past days also. I have seen this error first time. Is there anyone with the perfect explanation ?
12-18 15:06:26.921 1773-951/? W/Ads: Received error HTTP response code: 400
12-18 15:06:26.929 809-826/? W/Ads: There was a problem getting an ad response. ErrorCode: 0
12-18 15:06:26.937 809-809/? W/Ads: Failed to load ad: 0
Xml code :
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id"/>
MainActivity Code:
MobileAds.initialize(this, "app-id");
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);
Upvotes: 2
Views: 3295
Reputation: 4956
You just need to visit admob: Google AdMob
After that you need to visit Home tab
Please look into the image added
Upvotes: 4
Reputation: 750
When I received this I was mistakenly trying to load using an incorrect ad unit - try changing to one of the test units
Upvotes: 2
Reputation: 919
There are few things that could be going wrong:
hope these tips could help you.
Upvotes: 2