android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@228edc12 is not valid; is your activity running?

Stack Overflow | Redman | 10 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Spinner Show as Drop Down in Popup Window?

    Stack Overflow | 10 months ago | Redman
    android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@228edc12 is not valid; is your activity running?
  2. 0

    In Fatal Exception (Unable to add window) : What does "input channel is not allowed" mean?

    Stack Overflow | 1 year ago | Mann
    android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@412b2fb0 -- input channel is not allowed
  3. 0

    Strange crash logs when use mopub library

    GitHub | 3 years ago | omihaz
    android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@41e6d0d8 is not valid; is your activity running?
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    系统dialog 弹出的sina登录和注册和窗口,使用getContext().getApplicationContext(),在注册页面出现错误

    GitHub | 3 years ago | yajunsoft
    android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
  6. 0

    Populating spinner directly in the layout xml Error

    Stack Overflow | 4 years ago | zit
    android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@417634b8 is not valid; is your activity running?

  1. Indri Yunita 4 times, last 1 month ago
  2. cesarnog 1 times, last 7 months ago
  3. brunosatriani 10 times, last 10 months ago
  4. jk 25 times, last 9 months ago
  5. syntech16 1 times, last 1 year ago
9 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. Android Platform
    ActivityThread.main
    1. android.view.ViewRootImpl.setView(ViewRootImpl.java:562)
    2. android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
    3. android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
    4. android.widget.PopupWindow.invokePopup(PopupWindow.java:1104)
    5. android.widget.PopupWindow.showAsDropDown(PopupWindow.java:1008)
    6. android.widget.ListPopupWindow.show(ListPopupWindow.java:639)
    7. android.widget.Spinner$DropdownPopup.show(Spinner.java:1138)
    8. android.widget.Spinner.performClick(Spinner.java:683)
    9. android.view.View$PerformClick.run(View.java:19881)
    10. android.os.Handler.handleCallback(Handler.java:739)
    11. android.os.Handler.dispatchMessage(Handler.java:95)
    12. android.os.Looper.loop(Looper.java:135)
    13. android.app.ActivityThread.main(ActivityThread.java:5294)
    13 frames
  3. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invoke(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:372)
    2 frames
  4. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
    2 frames