Skip to content Skip to sidebar Skip to footer

Admob Ads Showing In Emulator But Not In Real Device

I have integrated admob in my app but the ads showed up in emulator but when i tried in real device it's not showing up. For integration i have added below code in AndroidManifest.

Solution 1:

Add the extras as well

AdMobExtrasextras=newAdMobExtras(bundle);
 AdRequestadRequest=newAdRequest.Builder()
 .addNetworkExtras(extras).build();
 adView.loadAd(adRequest);

Solution 2:

May be you missed adding Test device or added wrong ID, same thing happened with me as till I noticed in the Logcat this alert;

04-22 10:04:04.887 I/Ads: Use AdRequest.Builder.addTestDevice("6612F2AEECD2A4ADBD699CFC349AB01A") to get test ads on this device.

Once I added it, it started working fine.

Solution 3:

In my case there were an issue with the size of the view. So I debugged the app in Android Studio and found the right hint in the Android Monitor Tab:

Not enough space toshow ad. Needs 320x150 dp, but only has 318x0 dp.

Solution 4:

I faced the same issues when I was working on changing the targetSDKversion. I was using a Galaxy S7 phone to test. I manged to get it working by allocating more space for the adview. For ads to show up, tried making the view 3:1 with

android:layout_weight="3"for upper activity (75%)
android:layout_weight="1"for adView activity (25%)
android:layout_height="0dp"

Post a Comment for "Admob Ads Showing In Emulator But Not In Real Device"