第二个admob未显示



我在APK中添加了另一个admob,并直接复制粘贴了相同的广告代码。但第二次测试没有显示广告。你认为问题出在哪里?

<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3940256099942544/6300978111"
android:layout_gravity="bottom">
</com.google.android.gms.ads.AdView>

<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-3940256099942544/6300978111"
android:layout_gravity="bottom">
</com.google.android.gms.ads.AdView>

你的add id是相同的,所以改变这些id。

您当前的id是这个android: id ="@ + id/adView"

最新更新