<?xml version="1.0" encoding="utf-8"?>
<com.google.android.gms.ads.AdView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/ad"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    ads:adSize="BANNER"
    ads:adUnitId="@string/google_ads_banner_ad_unit_id"
    android:visibility="gone"
    tools:visibility="visible" />

<?xml version="1.0" encoding="utf-8"?>
<com.google.android.gms.ads.AdView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/ad"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    ads:adSize="SMART_BANNER"
    ads:adUnitId="@string/google_ads_banner_ad_unit_id"
    android:visibility="gone"
    tools:visibility="visible" />

Switch from BANNER ad size to SMART_BANNER ad size.
Switch from BANNER ad size to SMART_BANNER ad size.
