android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Naroju
, 1 year ago
via Stack Overflow by user1734039
, 8 months ago
Unable to add window -- token null is not for an application
via google.com by Unknown author, 1 year ago
Unable to add window -- token null is not for an application
via Stack Overflow by EpicPandaForce
, 2 years ago
Unable to add window -- token null is not for an application
via Stack Overflow by Unknown author, 2 years ago
Unable to add window -- token null is not for an application
via Stack Overflow by garlicman
, 2 years ago
Unable to add window -- token null is not for an application
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
at android.view.ViewRootImpl.setView(ViewRootImpl.java:583)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
at android.app.Dialog.show(Dialog.java:298)
at android.app.AlertDialog$Builder.show(AlertDialog.java:993)
at android.widget.VideoView$5.onError(VideoView.java:537)
at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:2592)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)

Users with the same issue

Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 1 year ago
55 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.