AdMob 未投入生产 (Android)

AdMob not working in production (Android)

我已经在测试模式下测试了我的横幅广告,它运行良好,之后我在 AdMob 中注册了该应用程序,更改了单元 ID 和构建方法,但它根本不起作用。我每次都得到 "Failed to load Ad 0"。

清单:

<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>

加载广告:

adView.loadAd(new AdRequest.Builder().build());

布局:

<com.google.android.gms.ads.AdView
        android:id="@+id/ad_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_below="@+id/fab"
        app:adSize="BANNER"
        app:adUnitId="@string/banner_ad_unit_id"/>

单位编号:

<string name="banner_ad_unit_id">ca-app-pub-*************/*********</string>

摘自此处:(注册我的应用程序后)

日志:

04-30 16:44:08.586 21345-21395/--------- W/Ads: There was a problem getting an ad response. ErrorCode: 0 04-30 16:44:08.591 21345-21345/--------- W/Ads: Failed to load ad: 0

不知道怎么回事

我又等了几个小时,终于可以用了。 AdMob 中生成的 ID 似乎需要一些时间才能 "validated" 并可用。