admob_flutter
admob_flutter copied to clipboard
Crash on Phone Screen Rotation
trafficstars
I've tried to put the banner ad in the SliverList and in the bottomNavigationBar and it gave me the same crash when I rotate the screen
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.ig.qoutes, PID: 26589
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.Display.getSize(android.graphics.Point)' on a null object reference
at org.chromium.ui.display.PhysicalDisplayAndroid.updateFromDisplay(PhysicalDisplayAndroid.java:97)
at org.chromium.ui.display.DisplayAndroidManager$DisplayListenerBackendImpl.onDisplayChanged(DisplayAndroidManager.java:174)
at android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate.handleMessage(DisplayManagerGlobal.java:508)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6316)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
Thank you for the great package. This problem happened not only on Android, but also on iPhone. The position of NavigationBar and TabBar is not correct if the iPhone screen is rotated and then moved back. And if you repeat it two or three times, the app will crash. If you hide AdMob, you won't have any problems.