android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@c745883 - permission denied

后端 未结 3 1424
遥遥无期
遥遥无期 2021-02-20 00:05

Here\'s my stack trace:

01-30 15:11:41.037 13010-13010/project.app E/AndroidRuntime: FATAL EXCEPTION: main
 Process: project.app, PID: 13010
 android.view.Window         


        
3条回答
  •  -上瘾入骨i
    2021-02-20 00:30

    Verify SYSTEM_ALERT_WINDOW Permission Or try to provide Overlay Permission Manually.

    As @Fco P. said you can try to change

    mRedBoxDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);

    **## If you are using Lenovo device. Please try with another one. This particular permission makes problem sometime in Lenovo device.****

提交回复
热议问题