android.view.WindowManager$BadTokenException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Spinner Show as Drop Down in Popup Window?
    via Stack Overflow by Redman
    ,
  • Android spinner problem
    via Stack Overflow by Harsh
    ,
  • Cannot show spinner in my activity
    via Stack Overflow by mahe madhi
    ,
    • android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@228edc12 is not valid; is your activity running? at android.view.ViewRootImpl.setView(ViewRootImpl.java:562) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85) at android.widget.PopupWindow.invokePopup(PopupWindow.java:1104) at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:1008) at android.widget.ListPopupWindow.show(ListPopupWindow.java:639) at android.widget.Spinner$DropdownPopup.show(Spinner.java:1138) at android.widget.Spinner.performClick(Spinner.java:683) at android.view.View$PerformClick.run(View.java:19881) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5294) 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:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)

    Users with the same issue

    Indri YunitaIndri Yunita
    4 times, last one,
    cesarnogcesarnog
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    jkjk
    25 times, last one,
    brunosatrianibrunosatriani
    10 times, last one,
    52 more bugmates