Bootstrap

Android错误之(Android 6.0)Unable to add window android.view.ViewRootImpl$W@d4521e8 -- permission denied

引入项目时已经加入了权限—>

但还是报错—
android6.0添加了运行时权限,因此在使用弹出框的地方加入如下代码:

    public void checkPermission() {
        if (Build.VERSION.SDK_INT >= 23) {
            if (!Settings.canDrawOverlays(MainActivity.this)) {
                Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
                        Uri.parse("package:" + getPackageName()));
                startActivityForResult(intent, 10);
            }
        }
    }
    @Override
    protected 
;