问题描述
我只是想知道这个问题是否是服务器端的......或者我必须在我的代码中修复一些东西......
i just want to know if this problem is server side...or i must fix something in my code...
onFailedToReceiveAd(广告请求成功,但由于广告资源不足没有返回广告
onFailedToReceiveAd(Ad request successful, but no ad returned due to lack of ad inventory
我正在使用带有 adwhirl 的 admob 在我的 android 应用程序中展示广告.
I'm using admob with adwhirl to show ads in my android application.
推荐答案
如果你得到这个错误,那么你的代码是正确的.问题是 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.
最后,您可以运行一个测试来查看您的 AdWhirl 代码是否正确实施,即请求测试广告.您可以通过在 AdWhirl 中指定测试模式来做到这一点:
Finally, a test you can run to see if your AdWhirl code is implemented correctly is to request a test ad. You can do this by specifying test mode in AdWhirl:
AdWhirlTargeting.setTestMode(true);
如果您返回测试广告,您就会知道您的代码正在按预期工作.
If you get back a test ad, you'll know your code is working as intended.
这篇关于onFailedToReceiveAd(广告请求成功,但在使用 admob 和 adwhirl 时,由于缺少广告资源,没有返回广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!