无法加载广告:3 [英] failed to load ad : 3

查看:38
本文介绍了无法加载广告:3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 DoubleClick 向我的 Android 应用程序设置广告,但无法显示最终广告,有人可以帮助我吗?

I'm setting an ad to my Android application using DoubleClick and can't manage to show the final ad, can someone help me?

当我通过添加.addTestDevice(xxx...")"来测试广告时我收到了测试广告,但是当我删除此行时,出现以下错误:

When I test an ad by adding ".addTestDevice("xxx...")" I get the test ad but when I remove this line I get the following error :

W/Ads:没有来自广告服务器的填充

W/Ads: No fill from ad server

W/Ads:加载广告失败:3

W/Ads: Failed to load ad: 3

我这样设置我的广告:

PublisherAdRequest adRequest = new PublisherAdRequest.Builder().build();
mPublisherAdView.loadAd(adRequest);

我的publisherView 看起来像这样:

And my publisherView look like this :

    <com.google.android.gms.ads.doubleclick.PublisherAdView
        android:id="@+id/pronostics_ad"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"

        android:layout_gravity="center"

        ads:adSize="BANNER"
        ads:adUnitId="@string/ad_unit_pronostic">
    </com.google.android.gms.ads.doubleclick.PublisherAdView>

可能有什么问题?

提前感谢您的回答.

推荐答案

W/Ads:加载广告失败:3

W/Ads: Failed to load ad: 3

根据文档 您收到以下错误代码:

As per the Documentation you are getting the following error code:

public static final int ERROR_CODE_NO_FILL

广告请求成功,但由于缺少广告资源.

The ad request was successful, but no ad was returned due to lack of ad inventory.

常数值:3

基于帖子 onFailedToReceiveAd- 广告请求成功,但在将 admob 与 adwhirl 结合使用时,由于缺少广告资源而没有返回广告:

如果您收到此错误,则您的代码是正确的.问题是AdMob 并不总是为每个请求返回一个广告.如果您刚刚注册了 AdMob,这种情况尤其可能发生发布商 ID,因为在发布之前需要一些时间和多次请求新 ID 开始返回广告.

If you are getting this error, then your code is correct. The issue is that AdMob does not always have an ad to return for every request. This may happen particularly if you have just registered your AdMob publisher ID, as it takes some time and multiple requests before the new ID starts returning ads.

您的填充率可能较低的另一个原因是您没有AdSense 回填已启用,或者您已过滤掉一些广告.查看您的应用设置,看看是否是这种情况.

Another reason your fill rate may be low is that you don't have AdSense backfill enabled, or you have filtered out some ads. Check your app settings to see if that is the case.

更新 app-ads.txt 并使用setTestDeviceIds";在物理设备上进行测试.

Update app-ads.txt and use "setTestDeviceIds" to test on physical device.

截至编辑这些说明时:https://developers.google.com/admob/android/test-ads工作.为了测试广告,我使用了 Demo ad Unit 并需要添加 app-ads.txt 行并等待它被 admob 爬虫(它单独在 Android-12 模拟器上工作)抓取,但仍然在 Logcat 中得到指令使用 "setTestDeviceIds"- 上面链接下的代码,结果证明需要在通过 USB 连接的物理设备上显示测试广告.

As of time of editing these instructions: https://developers.google.com/admob/android/test-ads worked. To test ads I used Demo ad Unit and needed to add the app-ads.txt line and wait for it to be crawled by admob crawler (which alone worked on Android-12 emulator), but still gotten instruction in Logcat to use the "setTestDeviceIds" - code under above link, which turned out to be required to display test ads on physical device connected via USB.

这篇关于无法加载广告:3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆