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

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

    YouTube fullscreen on WebView resulting to "Unable to add window -- token null is not valid"

    Stack Overflow | 7 months ago | Vlasis Alexopoulos
    android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
  2. 0

    how to stop webview video running in background?

    Stack Overflow | 3 years ago | Omid Aminiva
    android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
  3. 0

    android.view.WindowManager$BadTokenException

    Stack Overflow | 3 years ago | Amsheer
    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

    fix bug

    GitHub | 2 years ago | wkodate
    android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
  6. 0

    Issue 3440 - android - BadTokenException from the ZoomButtonsController - Android Open Source Project - Issue Tracker - Google Project Hosting

    google.com | 1 year ago
    android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?

  1. syntech16 1 times, last 12 months ago
  2. Indri Yunita 4 times, last 7 days ago
  3. cesarnog 1 times, last 6 months ago
  4. brunosatriani 10 times, last 9 months ago
  5. jk 25 times, last 9 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 null is not valid; is your activity running?

    at android.view.ViewRootImpl.setView()
  2. Android Platform
    ActivityThread.main
    1. android.view.ViewRootImpl.setView(ViewRootImpl.java:567)
    2. android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:246)
    3. android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
    4. android.widget.MediaController.show(MediaController.java:338)
    5. android.widget.MediaController.show(MediaController.java:298)
    6. android.webkit.HTML5VideoFullScreen$FullScreenMediaController.show(HTML5VideoFullScreen.java:391)
    7. android.webkit.HTML5VideoFullScreen.onPrepared(HTML5VideoFullScreen.java:225)
    8. android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:1975)
    9. android.os.Handler.dispatchMessage(Handler.java:99)
    10. android.os.Looper.loop(Looper.java:137)
    11. android.app.ActivityThread.main(ActivityThread.java:5041)
    11 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:793)
    2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
    2 frames
  5. Android Platform
    NativeStart.main
    1. dalvik.system.NativeStart.main(Native Method)
    1 frame