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

aliyun.com | 3 weeks ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    [popupwindow 软键盘]android-自定义软键盘用popupwindow弹出,点击按钮报错Unable to add window_popupwindow和软键盘-阿里云

    aliyun.com | 3 weeks ago
    android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@41601028 is not valid; is your activity running?
  2. 0

    How to show popupwindow on a listview item of a popupwindow

    Stack Overflow | 3 years ago | swati
    android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@419d2ae0 is not valid; is your activity running?
  3. 0

    PopupWindow $BadTokenException: Unable to add window -- token null is not valid

    w3facility.org | 1 year ago
    android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Autocomplete TextView in PopupWindow

    Stack Overflow | 4 years ago | Giri
    android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@40ece840 is not valid; is your activity running?
  6. 0

    Android Spinner Exception when clicked BadTokenException

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

  1. syntech16 1 times, last 10 months ago
  2. cesarnog 1 times, last 4 months ago
  3. brunosatriani 10 times, last 7 months ago
  4. jk 25 times, last 6 months 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@41601028 is not valid; is your activity running?

    at android.view.ViewRootImpl.setView()
  2. Android Platform
    ActivityThread.main
    1. android.view.ViewRootImpl.setView(ViewRootImpl.java:513)
    2. android.view.WindowManagerImpl.addView(WindowManagerImpl.java:301)
    3. android.view.WindowManagerImpl.addView(WindowManagerImpl.java:215)
    4. android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:140)
    5. android.view.Window$LocalWindowManager.addView(Window.java:537)
    6. android.widget.PopupWindow.invokePopup(PopupWindow.java:988)
    7. android.widget.PopupWindow.showAtLocation(PopupWindow.java:845)
    8. android.widget.PopupWindow.showAtLocation(PopupWindow.java:809)
    9. android.inputmethodservice.KeyboardView.showKey(KeyboardView.java:960)
    10. android.inputmethodservice.KeyboardView.access$100(KeyboardView.java:69)
    11. android.inputmethodservice.KeyboardView$1.handleMessage(KeyboardView.java:260)
    12. android.os.Handler.dispatchMessage(Handler.java:99)
    13. android.os.Looper.loop(Looper.java:137)
    14. android.app.ActivityThread.main(ActivityThread.java:4424)
    14 frames
  3. Java RT
    Method.invoke
    1. java.lang.reflect.Method.invokeNative(Native Method)
    2. java.lang.reflect.Method.invoke(Method.java:511)
    2 frames
  4. Android
    ZygoteInit.main
    1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
    2 frames
  5. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame