无法展示全屏广告,只有链接,横幅广告和弹出广告。我的代码:
revmob = RevMob.start(ac);
link = revmob.createAdLink(ac, listener);
fullscreen = revmob.createFullscreen(ac, listener);
其中ac是主要活动,而listener是以下列方式初始化的侦听器:
listener = new RevMobAdsListener() {
public void onRevMobAdReceived() {}
public void onRevMobAdNotReceived(String message) {}
public void onRevMobAdDisplayed(){}
public void onRevMobAdDismiss() {}
public void onRevMobAdClicked() {}
};
错误Logcat:
04-20 22:55:24.326: D/[RevMob](27728): Unexpected error on create Fullscreen Ad.
04-20 22:55:24.326: D/[RevMob](27728): java.lang.NullPointerException
04-20 22:55:24.326: D/[RevMob](27728): at com.revmob.ads.fullscreen.FullscreenActivity.initFullscreen(FullscreenActivity.java:158)
04-20 22:55:24.326: D/[RevMob](27728): at com.revmob.ads.fullscreen.FullscreenActivity.onCreate(FullscreenActivity.java:105)
04-20 22:55:24.326: D/[RevMob](27728): at android.app.Activity.performCreate(Activity.java)
04-20 22:55:24.326: D/[RevMob](27728): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java)
04-20 22:55:24.326: D/[RevMob](27728): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java)
04-20 22:55:24.326: D/[RevMob](27728): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java)
04-20 22:55:24.326: D/[RevMob](27728): at android.app.ActivityThread.access$600(ActivityThread.java)
04-20 22:55:24.326: D/[RevMob](27728): at android.app.ActivityThread$H.handleMessage(ActivityThread.java)
04-20 22:55:24.326: D/[RevMob](27728): at android.os.Handler.dispatchMessage(Handler.java)
04-20 22:55:24.326: D/[RevMob](27728): at android.os.Looper.loop(Looper.java)
04-20 22:55:24.326: D/[RevMob](27728): at android.app.ActivityThread.main(ActivityThread.java)
04-20 22:55:24.326: D/[RevMob](27728): at java.lang.reflect.Method.invokeNative(Native Method)
04-20 22:55:24.326: D/[RevMob](27728): at java.lang.reflect.Method.invoke(Method.java)
04-20 22:55:24.326: D/[RevMob](27728): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
04-20 22:55:24.326: D/[RevMob](27728): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
04-20 22:55:24.326: D/[RevMob](27728): at dalvik.system.NativeStart.main(Native Method)
如果执行以下代码,则会出现错误并使应用程序崩溃: fullscreen.show();