- Home /
App crashes on tapping on Admob ads and IAB
We are trying to impliment admob ads though mopub mediation. when we click on the admob banner ad app crash. Same thing happens when I click on purchases button(we are prime31 IAB plugin). It happens only in android 4.4 and above. Following is the crash log:-
10-22 20:02:14.836: E/AndroidRuntime(6795): FATAL EXCEPTION: main
10-22 20:02:14.836: E/AndroidRuntime(6795): Process: com.comp.apps, PID: 6795
10-22 20:02:14.836: E/AndroidRuntime(6795): java.lang.Error: FATAL EXCEPTION [main]
10-22 20:02:14.836: E/AndroidRuntime(6795): Unity version : 4.5.4f1
10-22 20:02:14.836: E/AndroidRuntime(6795): Device model : LGE Nexus 4
10-22 20:02:14.836: E/AndroidRuntime(6795): Device fingerprint: google/occam/mako:4.4.4/KTU84P/1227136:user/release-keys
10-22 20:02:14.836: E/AndroidRuntime(6795): Caused by: java.lang.NullPointerException
10-22 20:02:14.836: E/AndroidRuntime(6795): at com.android.internal.app.ActionBarImpl.doHide(ActionBarImpl.java:746)
10-22 20:02:14.836: E/AndroidRuntime(6795): at com.android.internal.app.ActionBarImpl.updateVisibility(ActionBarImpl.java:674)
10-22 20:02:14.836: E/AndroidRuntime(6795): at com.android.internal.app.ActionBarImpl.hideForSystem(ActionBarImpl.java:646)
10-22 20:02:14.836: E/AndroidRuntime(6795): at com.android.internal.widget.ActionBarOverlayLayout.onWindowSystemUiVisibilityChanged(ActionBarOverlayLayout.java:151)
10-22 20:02:14.836: E/AndroidRuntime(6795): at com.android.internal.widget.ActionBarOverlayLayout.setActionBar(ActionBarOverlayLayout.java:98)
10-22 20:02:14.836: E/AndroidRuntime(6795): at com.android.internal.app.ActionBarImpl.init(ActionBarImpl.java:182)
10-22 20:02:14.836: E/AndroidRuntime(6795): at com.android.internal.app.ActionBarImpl.<init>(ActionBarImpl.java:166)
10-22 20:02:14.836: E/AndroidRuntime(6795): at android.app.Activity.initActionBar(Activity.java:1912)
10-22 20:02:14.836: E/AndroidRuntime(6795): at android.app.Activity.getMenuInflater(Activity.java:3347)
10-22 20:02:14.836: E/AndroidRuntime(6795): at android.app.Activity.onCreatePanelMenu(Activity.java:2539)
10-22 20:02:14.836: E/AndroidRuntime(6795): at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:436)
10-22 20:02:14.836: E/AndroidRuntime(6795): at com.android.internal.policy.impl.PhoneWindow.doInvalidatePanelMenu(PhoneWindow.java:800)
10-22 20:02:14.836: E/AndroidRuntime(6795): at com.android.internal.policy.impl.PhoneWindow$1.run(PhoneWindow.java:221)
10-22 20:02:14.836: E/AndroidRuntime(6795): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
10-22 20:02:14.836: E/AndroidRuntime(6795): at android.view.Choreographer.doCallbacks(Choreographer.java:574)
10-22 20:02:14.836: E/AndroidRuntime(6795): at android.view.Choreographer.doFrame(Choreographer.java:543)
10-22 20:02:14.836: E/AndroidRuntime(6795): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
10-22 20:02:14.836: E/AndroidRuntime(6795): at android.os.Handler.handleCallback(Handler.java:733)
10-22 20:02:14.836: E/AndroidRuntime(6795): at android.os.Handler.dispatchMessage(Handler.java:95)
10-22 20:02:14.836: E/AndroidRuntime(6795): at android.os.Looper.loop(Looper.java:136)
10-22 20:02:14.836: E/AndroidRuntime(6795): at android.app.ActivityThread.main(ActivityThread.java:5001)
10-22 20:02:14.836: E/AndroidRuntime(6795): at java.lang.reflect.Method.invokeNative(Native Method)
10-22 20:02:14.836: E/AndroidRuntime(6795): at java.lang.reflect.Method.invoke(Method.java:515)
10-22 20:02:14.836: E/AndroidRuntime(6795): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
10-22 20:02:14.836: E/AndroidRuntime(6795): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
10-22 20:02:14.836: E/AndroidRuntime(6795): at dalvik.system.NativeStart.main(Native Method)
We are using Unity 4.5.4, Mopub 3.2.0 and latest google play services
@piyushr have you found the reason ? how to fix this issue. i am facing the same problem.
@piyushr I also have this problem, have you solved it? plz any help would be greatfull
@gershonavi i was using an outdated android immersive mode plugin from assets store. In my case crash was not occurring because of admob ad click, but because of that plugin. It was trying to enable immersive mode when we come back into game after tapping the ad.
Answer by koray1396 · Nov 28, 2014 at 03:48 PM
you should look at complete log, not just AndroidRuntime. I assume something may be wrong with your manifest file.
Answer by a.dolbilov · Sep 23, 2015 at 09:13 AM
I've solved this problem by adding into section of AndroidManifest.xml.
sorry, browser eats actual answer (android:theme="@android:style/Theme.NoTitleBar") into application section of Android$$anonymous$$anifest.xml
Your answer
Follow this Question
Related Questions
In App Purchases & Ads not working in app after publishing to Google Play using Android App Bundle 2 Answers
Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define 0 Answers
How can I upgrade my Android Jar Dependencies? 1 Answer
How to enable ads in your games. 1 Answer
Admob makes my scene load slower 1 Answer