Admob ads not showing up

后端 未结 14 1907
轮回少年
轮回少年 2021-01-02 02:31

I am trying to implement Admob in Android and I am seeing requests coming into AdMob. However, I am not seeing the Admob ads being displayed on the Android screen in the emu

相关标签:
14条回答
  • 2021-01-02 03:32

    It might be an issue with the space, you need to ensure that the space is available for the ad to be displayed. If you have a padding on the parent layout it might reduce the space available. According to the google Admob docs no ad will be displayed if the space isn't there for it to be displayed.

    "The SDK will request whatever size the requesting AdView was instantiated with. If there isn't enough space on the device's screen to display the ad, nothing will be shown."

    So my suggestion is to ensure no padding is on the parent layout and actually assign a height and width to the banner ad like this

    <com.google.ads.AdView
        android:id="@+id/adView"
        android:layout_alignParentBottom="true"
        android:layout_width="@dimen/banner_width"
        android:layout_height="@dimen/banner_height"
        ads:adSize="BANNER"
        ads:adUnitId="My Publisher ID"
        ads:loadAdOnCreate="true"/>
    

    And store the appropriate dimensions in your dimens.xml in the values folder.

    0 讨论(0)
  • 2021-01-02 03:34
    1. Go to app settings on admob.com and make sure use location data for ads is turned off if your app is not a location based app.

      Use location data for ads is used to filter ads based on location and works only on app with location permission granted. If app does not use location permission, ads will not show.

    2. Make sure your have filled payment details

    0 讨论(0)
提交回复
热议问题