0

My android app crashes due to new splashscreen api implementation after releasing to playstore. Some users have experienced crashes in splashscreen issue as per the crashlytics

I have tested in android device api level versions 12, 13 , 14 splashscreen working fine and not able to reproduce the crash.

Crash details:

Fatal Exception: java.lang.NullpointerException

Attempt to invoke virtual method 'android.view.View android.view.window.peekDecorview()' on a null object reference

android.app.ActivityThread.handleAttachSplashScreenView (ActivityThread.java:4634)

android.app.servertransaction.TransferSplashScreenViewStateItem.execute(TransferSplashScreenViewStateItem.java:40)

android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)

android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)

android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)

android.app.ActivityThread$H.handleMessage(ActivityThread.java:2685)

android.os.Handler.dispatchMessage(Handler.java:106)

android.os.Looper.loopOnce(Looper.java:230)

android.os.Loop(Looper.java:319)

android.app.ActivityThread.main(ActivityThread.java:8919)

Java.lang.reflect.Method.invoke(Method.java)

com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)

com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

Crashlytics screenshot:

enter image description here

2
  • 1
    Please edit your question and add the entire error message as text and not as an image.
    – Alex Mamo
    Commented Jul 10 at 8:11
  • Hi @AlexMamo update the error msg as text Commented Jul 10 at 8:49

1 Answer 1

0

It's hard to tell without some more information on what devices the crash is happening and their Android Version.

But it seems like you have a migration problem to the new SplashScreen Api. You can see complete instructions here: https://developer.android.com/develop/ui/views/launch/splash-screen/migrate

According to the Window class definition: https://developer.android.com/reference/android/view/Window

peekDecorView() returns the current DecorView of the window or null. the DecorView is what holds the background of your window which in your case is the SplashScreen Window. So I would guess some of your users have trouble setting the Drawable Icon background which causes your DecorView to become null.

2
  • thanks. I have attached Screenshot of crashlytic in description of question please look it int it. I have tested in android 12, 13, 14 devices its working fine. We are not able to reproduce the issue. Commented Jul 10 at 11:32
  • Issue happened android 14 version, GalaxyS22 device as per the crashlytics Commented Jul 10 at 11:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.