Not Enough Space to Show Ad (Admob)

Not enough space to show ad (AdMob)

The left and right padding of your RelativeLayout is consuming space required by your AdView.

Change RelativeLayout config to :

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
...
android:paddingLeft="0dp"
android:paddingRight="0dp"
...
>

You probably also want to change your AdView config to:

<com.google.ads.AdView
android:id="@+id/adMobadView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
...
/>

as you don't really want your AdView to consume the entire screen.

Admob Error: Not enough space to show ad. Needs 320x50 dp, but only has 309x0 dp

According to Admob docs/guidelines

The ad view require to be of full width of the device.
Since you give the padding to your layout it fails because it can't fill full width of the layout.

You just have to remove the padding in your RelativeLayout to fix this

Admob - Not enough space to show ad wants

Not enough space to show ad. Needs 720x404 dp, but only has 533x404
dp.

but your device is reporting 800 pixels, pixels is not the same as dp so based on the Screen density of your device

  • .75 on ldpi (120 dpi)
  • 1.0 on mdpi (160 dpi; baseline)
  • 1.5 on hdpi (240 dpi)
  • 2.0 on xhdpi (320 dpi)
  • 3.0 on xxhdpi (480 dpi)
  • 4.0 on xxxhdpi (640 dpi)

you will calculate how many dp is really reporting your device, for example with a Screen Density of 2.0:

dp = px / (dpi / 160) = 800/(320 / 160) = 400 dp (404dp)

AdMob ads not showing. Not enough space to show ad

Just define weight on your listview....

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<TextView
android:id="@+id/current_path_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Ding Chak"
android:textAppearance="?android:attr/textAppearanceLarge" />

<ListView
android:id="@+id/list_of_files"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
</ListView>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<com.google.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="XXXXXXXXXXXXX"
ads:loadAdOnCreate="true"
ads:testDevices="XXXXXXXXXXXXX" />
</LinearLayout>

</LinearLayout>


Related Topics



Leave a reply



Submit