java.lang.RuntimeException: Unable to start activity ComponentInfo{me.zhanghai.android.patternlock.sample/me.zhanghai.android.patternlock.sample.app.LockScreenConfirm}: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@3124ada -- permission denied for this window type

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

Create an empty public constructor in your code.

Solutions on the web

via GitHub by kikani89
, 1 year ago
Unable to start activity ComponentInfo{me.zhanghai.android.patternlock.sample/me.zhanghai.android.patternlock.sample.app.LockScreenConfirm}: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@3124ada -- permission denied for this window type
via GitHub by Armaxis
, 1 year ago
Unable to start activity ComponentInfo{com.armaxis.mobile/com.armaxis.mobile.StartupActivity}: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@3fb6060 -- permission denied for this window type
via Stack Overflow by mahendra
, 1 year ago
Unable to start activity ComponentInfo{com.example.accer.sportsgr/com.example.accer.sportsgr.Updater}: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
via Stack Overflow by Jules Hummelink
, 1 year ago
Unable to start activity ComponentInfo{com.jules_citronic.racecarcontrol/com.jules_citronic.racecarcontrol.control}: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
via Stack Overflow by Melodie
, 6 months ago
Unable to start activity ComponentInfo{.com.audioreretest/.com.audioreretest.MainActivity}: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not valid; is your activity running?
via Stack Overflow by Johnny
, 1 year ago
Unable to start activity ComponentInfo{fr.xxx.xxx.dev/fr.xxx.xxx.ui.activities.HomeActivity}: java.lang.RuntimeException: Adding window failed
java.lang.RuntimeException: Unable to start activity ComponentInfo{me.zhanghai.android.patternlock.sample/me.zhanghai.android.patternlock.sample.app.LockScreenConfirm}: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@3124ada -- permission denied for this window type
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)

Users with the same issue

66 times, 4 weeks ago
Once, 2 months ago
33 times, 3 months ago
8 times, 4 months ago
468 times, 4 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.