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 ne.jp by Unknown author, 9 months ago
Unable to add window -- token null is not for an application
via Stack Overflow by Joseph82
, 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 Yogesh Somani
, 2 years ago
Unable to add window -- token null is not for an application
via dolinked.com by Unknown author, 2 years ago
Unable to add window -- token null is not for an application
via Stack Overflow by michael
, 10 months 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.ViewRoot.setView(ViewRoot.java:509)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
at android.app.Dialog.show(Dialog.java:241)
at android.app.AlertDialog$Builder.show(AlertDialog.java:802)
at android.widget.VideoView$4.onError(VideoView.java:387)
at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:1264)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)

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
11 more bugmates

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