Admob标语广告无法加载,错误代码:3未填充 [英] Admob Banner ads fail to load, Error Code : 3 No fill

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

问题描述

我已经集成了admob Banner&在我的应用中插页式广告.我注意到某些广告横幅无法加载.当广告加载失败时,我已经调试了错误代码,该错误代码很常见错误:3 ,它表示无填充错误.我已经在3-4个屏幕中添加了横幅广告和非页内广告.
现在的问题是,只有一个屏幕横幅ID正在运行,所有非页内广告都可以正常工作,但是某些横幅无法正常工作.(在陷波屏中).
当我将所有屏幕的横幅ID更改为可以正常运行的所有横幅ID,并且所有屏幕也都可以正常用于缺口屏幕时.
我已经在牛轧糖,奥利奥,棉花糖等中测试过这种情况.普通屏幕和陷波屏幕.
我只是注意到,某些带有缺口屏幕的设备无法加载所有广告.但是所有正常的屏幕都可以正常工作.所以我不能得到确切的问题.
注意:我正在测试时,所有设备都使用相同的wifi网络运行.
我不知道其他单位ID是否有问题.但是我的admob帐户中所有单位ID的设置都相同.根据我的测试案例,我的AdUnit ID出了点问题.但是无法解决问题所在.
我注意到了另外一种情况.如果我在请求中添加了测试ID,那么它也可以正常工作.我从android日志中获取了设备哈希.

I've integrated admob Banner & Interstitial in my app. I've noticed that some of ads banner are fail to load. I've debug error code when ads fail to load, Error code is common Error : 3 It mean No fill error. I've added banner and Interstitial ads in 3-4 screens.
Now Issues is that just one screen banner id is running and all Interstitial are working fine but some of banner not working. (in notch screen).
When I've change all screens banner id with same which was running proper and all screens working fine for notch screen also.
I've tested this case in nougat, oreo, marshmello etc. Normal Screen and notch screen.
I just notice that some of devices running with notch screen are not load all ads. But all normal screens are working fine. So I can't getting exact issue.
Note: All devices are running with same wifi network when I am testing.
I don't know if any thing is wrong with other unit id. But all unit id have same settings in my admob account. As per my testing case something is wrong with my AdUnit id. But can't getting what's the issue is.
I noticed one more case. If I added Testing id in request then it also working. I got device hash from android log.

I/Ads: Use AdRequest.Builder.addTestDevice("XXXXXXXXXX") to get test ads on this device.
.addTestDevice("XXXXXXXXXX")


如果有额外的调试技术,请使用admob帐户与我分享,以便我进行详细检查.有什么可以帮助我详细检查此问题的吗?如果有人需要更多说明,请发表评论.


If any extra debugging technique there it admob account then please share with me so I can check in detail. Can any please help me to check this issue in detail? Please comment if any one need more explanation.

推荐答案

我尝试将运行不同操作系统的设备组合在一起.终于我找到了解决方案.当应用失败并出现错误代码3(无填充错误)时,我编写了此代码

I've tried combination of devices running with different OS. Finally I got solution. I wrote this code when app was fail with error code 3 (No Fill Error)

<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="SMART_BANNER"
        ads:adUnitId="XXXXXXXXXXXXXXXX>
    </com.google.android.gms.ads.AdView> 

现在,按照Google的示例代码,我必须在 match_parent ,所以我更改了 match_parent 的宽度,仍然发生了相同的错误.所以最后我用 BANNER 更改了大小类型,现在它可以在所有设备上运行.(Google的演示代码使用BANNER类型)我刚刚尝试了这种尺寸,现在所有设备都投放广告横幅.不确定,但根据我的测试方案,广告失败了,哪台设备的分辨率较高(19:9比例大于1080:2280像素,而16:9比例以上)并且将横幅尺寸类型设置为 BANNER 后效果很好也具有较大的分辨率.

Now As per google sample code I've to use width with match_parent so I've changed width with match_parent still same error occurred. So finally I've change Size type with BANNER and now it run in all devices. (Google's demo code use BANNER type) I just tried this size and now all devices run ads banner. Not sure but as per my testing scenario ad was fail which device have large resolution (More than 16:9 ratio like 19:9 ratio 1080 x 2280 pixels) and After Set Banner size type as BANNER works fine with large resolution also.

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

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