我的应用中的广告昨天在调试模式下正常工作,但今天我收到了这个错误
2019-04-06 05:08:47.412 12191-12286/www.pro_cs_is.com E/Ads: Fail to get isAdIdFakeForDebugLogging
java.io.IOException: Connection failure
at com.google.android.gms.ads.identifier.a.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:68)
at com.google.android.gms.ads.internal.util.d.d_(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:4)
at com.google.android.gms.ads.internal.util.b.run(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:3)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
2019-04-06 05:08:48.772 12191-12191/www.pro_cs_is.com E/AD ERROR: error code3
2019-04-06 05:09:04.314 12191-12191/www.pro_cs_is.com E/AD ERROR: error code3
2019-04-06 05:09:08.344 12191-12191/www.pro_cs_is.com E/AD ERROR: error code3
显示元数据
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="@string/ADMOB_APP_ID"/>
主要的cゔぃtyあd xml
<com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/mainActivityBanner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="@string/MainActivityBanner"
android:visibility="visible"
>
</com.google.android.gms.ads.AdView>
我尝试过广告单元测试和它的工作,但我的联合不是
之后我在他们回复的谷歌移动广告SDK技术论坛上发表了posted
“我建议您加载测试广告而不是实时广告,以避免无效活动。您可以使用实时广告单元ID和启用测试设备执行此操作。您遇到的错误代码3表示广告请求成功但不能由于缺少广告资源而返回广告。另请注意,在未发布的应用中加载广告单元ID可能会产生影响填充率。“
在我发布应用程序后,广告显示成功