gpt4 book ai didi

android - "Failed to load ad: 3"双击

转载 作者:太空狗 更新时间:2023-10-29 14:48:00 25 4
gpt4 key购买 nike

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

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

W/Ads: No fill from ad server

W/Ads: Failed to load ad: 3

我这样设置我的广告:

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

我的 publisherView 看起来像这样:

<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: Failed to load ad: 3

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

public static final int ERROR_CODE_NO_FILL

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

Constant Value: 3

基于帖子onFailedToReceiveAd - Ad request successful, but no ad returned due to lack of ad inventory when using admob with adwhirl :

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

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

编辑:

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

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

关于android - "Failed to load ad: 3"双击,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37819977/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com