我正在尝试在我的应用程序中实现 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
然后可以再次下载广告。但填充率很低。
看起来 SDK 拒绝了从 AdMob 服务器发送下来的响应,这真的很奇怪。我不认为这是一个可以在 StackOverflow 上解决的问题,所以我建议在AdMob 的 SDK 支持论坛 https://groups.google.com/forum/#!forum/google-admob-ads-sdk,支持团队可以尝试深入研究该问题。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)