我正在尝试在我的应用中实现 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's SDK support forum 中创建一个帖子,支持团队可以尝试深入研究问题。
关于android - NativeAdAdvanced - 不正确的原生广告响应。单击操作未正确指定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49065562/