【发布时间】:2015-03-25 10:58:59
【问题描述】:
您好,我正在我的应用中使用 AdMob。
下面的方法用来设置unit Id和设置TestDevice。
public static void getInterstitialAdInstace(final Context mContext) {
// Create the interstitial.
interstitialView = new InterstitialAd(mContext);
interstitialView.setAdUnitId(mContext.getResources().getString(
R.string.GoogleAdMob_interAdUnitId));
AdRequest adRequest = new AdRequest.Builder().addTestDevice(
AdRequest.DEVICE_ID_EMULATOR).build();
interstitialView.setAdListener(new AdListener() {
@Override
public void onAdLoaded() {
}
});
// Begin loading your interstitial.
interstitialView.loadAd(adRequest);
}
以下方法用于展示插页式广告。
public static void displayInterstitial() {
if (interstitialView != null) {
if (interstitialView.isLoaded()) {
interstitialView.show();
}
}
}
我们已成功将应用上传到 Play 商店。但几个月后,我们的印象数为零。我们检查了代码。 log-cat 显示以下错误。
No fill from ad server.
No fill from any mediation ad networks.
我探索了一些。其中之一是Link 1
我该怎么办?需要创建任何新的 AdUnitId?还是有什么需要做的?
【问题讨论】:
-
是的。您应该使用您发布的链接中的解决方案。
-
检查你的adsense/admob账号,可能是你的google有问题...
标签: android admob adsense adview