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 GitHub by jehy
, 1 year ago
Unable to add window -- token null is not valid; is your activity running?
via Stack Overflow by RyanCheu
, 1 year ago
Unable to add window -- token null is not valid; is your activity running?
via Stack Overflow by Lucas A
, 1 year ago
Unable to add window" on buider.show() I am using DialogFragments and AlertDialogs, I guess it could be the core issue but it just doesn't add up since it only affects Marshmallow users. Fatal Exception: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
via GitHub by NikoSoftware
, 8 months ago
Unable to add window -- token null is not valid; is your activity running?
via Stack Overflow by Expiredmind
, 1 year ago
android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?	at android.view.ViewRootImpl.setView(ViewRootImpl.java:849)	at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:337)	at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)	at android.widget.PopupWindow.invokePopup(PopupWindow.java:1329)	at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1077)	at android.widget.PopupWindow.showAtLocation(PopupWindow.java:1035)	at com.android.internal.widget.FloatingToolbar$FloatingToolbarPopup.show(FloatingToolbar.java:563)	at com.android.internal.widget.FloatingToolbar.show(FloatingToolbar.java:214)	at com.android.internal.view.FloatingActionMode$FloatingToolbarVisibilityHelper.updateToolbarVisibility(FloatingActionMode.java:411)	at com.android.internal.view.FloatingActionMode$1.run(FloatingActionMode.java:65)	at android.os.Handler.handleCallback(Handler.java:739)	at android.os.Handler.dispatchMessage(Handler.java:95)	at android.os.Looper.loop(Looper.java:158)	at android.app.ActivityThread.main(ActivityThread.java:7229)	at java.lang.reflect.Method.invoke(Method.java)	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)