Manifest.permission.CALL_PHONE语句中permission是红色的
/** * 拨打电话 */ private void callPhone() { if (ContextCompat.checkSelfPermission(this, Manifest.permission.Call_PHONE) != PackageManager.PERMISSION_GRANTED) { // 做权限的申请处理 ActivityCompat.requestPermissions(this, new String[]{ Manifest.permission.CALL_PHONE}, 1); } else { // 已经授予了权限,则调用业务逻辑,打电话 doCallPhone(); } }
这里的Manifest.permission.CALL_PHONE 中 permission是红色的,提示:Cannot reslove symbol 'permission'