Open keluokeda opened 3 years ago
如果app的清单配置文件里面声明了android.permission.CAMERA权限,那么在调用相机的时候需要申请相机权限,不然会报错
java.lang.SecurityException: Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=com.oppo.camera/.Camera clip={text/uri-list U:content://com.ke.rximagepicker.demo.image_picker.provider/external_files/Android/data/com.ke.rximagepicker.demo/files/Pictures/JPEG_20201218_095112_6286554076496488627.jpg} (has extras) mCallingUid=10216 } from ProcessRecord{388c884 16176:com.ke.rximagepicker.demo/u0a216} (pid=16176, uid=10216) with revoked permission android.permission.CAMERA
可以使用郭神PermissionX解决方案 https://github.com/guolindev/PermissionX
如果app的清单配置文件里面声明了android.permission.CAMERA权限,那么在调用相机的时候需要申请相机权限,不然会报错