android.view.WindowManager$BadTokenException

Unable to add window -- token null is not valid; is your activity running?

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web793

  • via GitHub by nikclayton
    , 3 weeks ago
    Unable to add window -- token null is not valid; is your activity running?
  • Unable to add window -- token null is not valid; is your activity running?
  • via GitHub by alexeyvasilyev
    , 2 months ago
    Unable to add window -- token null is not valid; is your activity running?
  • Stack trace

    • android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running? at android.view.ViewRootImpl.setView(ViewRootImpl.java:678) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:279) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) at android.widget.PopupWindow.invokePopup(PopupWindow.java:1070) at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:970) at android.widget.ListPopupWindow.show(ListPopupWindow.java:644) at android.widget.AutoCompleteTextView.showDropDown(AutoCompleteTextView.java:1114) at mono.android.text.TextWatcherImplementor.n_afterTextChanged(Native Method) at mono.android.text.TextWatcherImplementor.afterTextChanged(TextWatcherImplementor.java:33) at android.widget.TextView.sendAfterTextChanged(TextView.java:7947) at android.widget.TextView.setText(TextView.java:4084) at android.widget.TextView.setText(TextView.java:3933) at android.widget.EditText.setText(EditText.java:91) at android.widget.TextView.setText(TextView.java:3908) at android.widget.TextView.onRestoreInstanceState(TextView.java:3808) at android.view.View.dispatchRestoreInstanceState(View.java:13795) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3022) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3022) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3022) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3022) at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3022) at android.view.View.restoreHierarchyState(View.java:13773) at android.support.v4.app.Fragment.restoreViewState(Fragment.java:465) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1094) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1234) at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2046) at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:174) at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:597) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1228) at android.app.Activity.performStart(Activity.java:5987) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2423) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2522) at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4118) at android.app.ActivityThread.access$900(ActivityThread.java:167) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1423) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5534) 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:955) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:750)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    6 times, 1 month ago
    4 times, 3 months ago
    2 times, 4 months ago
    52 more bugmates