1

我正在尝试在我的应用中实现 NativeAd。直到昨天一切正常,现在正在打印这些错误日志。

I/Ads: WebView loading for native ads.
I/Ads: Javascript has loaded for native ads.
I/Ads: Received log message: <Google:HTML> Incorrect native ad response. Click actions were not properly specified

onAdFailedToLoad errorCode = 0

所以我不能再展示原生广告了。这是我如何处理请求。

private AdRequest adRequest = new AdRequest.Builder()
            .build();

private NativeAdOptions nativeAdOptions = new NativeAdOptions.Builder()
        .setAdChoicesPlacement(ADCHOICES_TOP_RIGHT)
        .setRequestMultipleImages(false)
        .setReturnUrlsForImageAssets(true)
        // Methods in the NativeAdOptions.Builder class can be
        // used here to specify individual options settings.
        .build();

AdLoader adLoader = new AdLoader.Builder(mContext, adUnitId)
            .forAppInstallAd(new NativeAppInstallAd.OnAppInstallAdLoadedListener() {
                @Override
                public void onAppInstallAdLoaded(NativeAppInstallAd appInstallAd) {
                    refreshAd(appInstallAd);
                }
            })
            .forContentAd(new NativeContentAd.OnContentAdLoadedListener() {
                @Override
                public void onContentAdLoaded(NativeContentAd contentAd) {
                    refreshAd(contentAd);
                }
            })
            .withAdListener(adListener)
            .withNativeAdOptions(nativeAdOptions)
            .build();

adLoader.loadAd(adRequest);

如果我注释掉,forAppInstallAd则可以再次下载广告。但是填充率非常低。

4

1 回答 1

1

看起来 SDK 正在拒绝从 AdMob 服务器发送的响应,这真的很奇怪。我不认为这是可以在 StackOverflow 上解决的问题,因此我建议在AdMob 的 SDK 支持论坛中创建一个帖子,支持团队可以尝试深入研究这个问题。

于 2018-03-04T19:46:52.220 回答