WindowManager$BadTokenException unable to add window

后端 未结 3 2014
梦毁少年i
梦毁少年i 2020-12-11 15:25

I am developing app for background videorecording ,thats why i used WindowManager,but it did not worked for me.gives following errors:

08-         


        
3条回答
  •  星月不相逢
    2020-12-11 16:04

    08-23 15:38:21.021: E/AndroidRuntime(4200): Caused by: android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@418c0b68 -- permission denied for this window type
    

    Problem: Permission missing in maifest file.

    Solution: Use following permission in AndroidManifest.

    android.permission.SYSTEM_ALERT_WINDOW
    

提交回复
热议问题