Google 移动广告创意预览不工作

Google Mobiles Ads Creative Preview not working

我是移动广告新手。我正在 PublisherAdView 加载广告。当我在 onAdLoaded() 中收到回调时,我能够成功加载广告。

以下是广告加载成功的日志。

I/CommonAdsUtility: loadCarouselSearchScreen() [Thread: main]
I/CommonAdsUtility: screenName: android_pnr_search [Thread: main]
I/CommonAdsUtility: card_type 2 [Thread: main]
I/CommonAdsUtility: card_ad_unit/12756069/android_pnr_search_banner [Thread: main]
I/CommonAdsUtility: loadBannerAd() [Thread: main]
I/CommonAdsUtility: adUnitId: /12756069/android_pnr_search_banner [Thread: main]
I/CommonAdsUtility: ryTag: null [Thread: main]
I/CommonAdsUtility: adSizes: [320x100_as, 320x160_as, 320x50_mb, 300x250_as, fluid, smart_banner] [Thread: main]
I/Ads: Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("B1EFAF80C6D9B2BB3EDF01B714EC2319") to get test ads on this device.
I/CommonAdsUtility: dfpCarouselEntity::: [] [Thread: main]
W/Ads: Not retrying to fetch app settings
I/CommonAdsUtility: onAdLoaded() >>> adUnitId/12756069/and_carousel_small_home [Thread: main]
I/Ads: SDK version: afma-sdk-a-v201604999.201004000.1
I/CommonAdsUtility: onAdLoaded() >>> adUnitId/12756069/android_pnr_search_banner [Thread: main]

但是,每当我预览广告素材时都会收到错误消息。由于我在这方面经验不多,所以我不完全理解这一点。弄了一天也没找到相关资源

我已关注: https://developers.google.com/ad-manager/mobile-ads-sdk/android/debug https://support.google.com/admanager/answer/7160685#push

我的设备已经链接,从 Google Ad Manager 控制台推送广告素材对我不起作用。这是我得到的错误。我希望我们开发人员社区中的许多人可能更早地遇到过这个问题。

W/Ads: Fail to get in app preview response json.
    org.json.JSONException: Value KHNivylpQmwYxd6Z9gUwxfrO_QWIAYCAgKCX5rCRcw of type java.lang.String cannot be converted to JSONObject
        at org.json.JSON.typeMismatch(JSON.java:111)
        at org.json.JSONObject.<init>(JSONObject.java:160)
        at org.json.JSONObject.<init>(JSONObject.java:173)
        at com.google.android.gms.ads.internal.util.aj.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:760)

初始化过程运行良好:

MobileAds.initialize(mContext) { initializationStatus ->
            GlobalLoggerUtils.showLog(TAG, "onInitializationComplete()")
            initializationStatus.adapterStatusMap.entries.forEach {
                GlobalLoggerUtils.showLog(TAG, it.value.description)
                GlobalLoggerUtils.showLog(TAG, it.value.initializationState.toString())
                GlobalLoggerUtils.showLog(TAG, it.value.latency.toString())
            }
        }

2020-05-22 00:00:08.942 I/MainApplication: onInitializationComplete() [Thread: main]
2020-05-22 00:00:08.942 I/MainApplication:  [Thread: main]
2020-05-22 00:00:08.943 I/MainApplication: READY [Thread: main]
2020-05-22 00:00:08.943 I/MainApplication: 3 [Thread: main]

依赖性:

implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.19.0'

设备已经关联

正在打开调试菜单以预览广告素材

未知错误

让我知道是否有任何我遗漏的细节或要添加到此问题的任何标签以便更好地达到目的。

我已经在 Google 支持上创建了一个主题:https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/android/Xs1HtsT2934

这是相同的示例和视频: 示例:https://drive.google.com/file/d/1F2wBFofHTPlZxs9VUb0KOArjNTFItcqj/view?usp=sharing 视频:https://drive.google.com/file/d/1ZKY_2kui8X-OuErJUQdzqZLcrMcpyFRC/view?usp=sharing

最终,Google 的移动广告 SDK 团队认可并承认了。

It seems a number of publishers have reported this and a fix is in progress and at this stage is tentatively scheduled for release next week (week of June 15). This will be a server-side fix so no new SDK required.

Will let you know when I have confirmation of the fix in production.


修复已完成,现已上线。