本文将带你了解Android应用开发[RK3288][Android6.0] 无法连接相机怎么解决?,希望本文对大家学Android有所帮助。
Platform: RK3288
OS: Android 6.0
Kernel: 3.10.92
现象:
偶发性打开相机时提示“连接失败”。
异常Log:
12-25 10:47:04.190 I/CAM_OneCamFtrCnfgCrtr(29184): CaptureModule? true
12-25 10:47:04.208 I/CAM_Profiler(29184): [ 48.056ms][ui] GUARD: CameraActivity.onCreateTasks - [15.373ms] Glide.setup
12-25 10:47:04.219 D/CameraHal(28971): camera_get_camera_info(1320): camera_get_camera_info(1320): camera_0 facing(0), orientation(0)
12-25 10:47:04.220 D/CameraHal(28971): camera_get_camera_info(1320): camera_get_camera_info(1320): camera_1 facing(1), orientation(0)
12-25 10:47:04.226 D/CameraHal(28971): camera_get_camera_info(1320): camera_get_camera_info(1320): camera_0 facing(0), orientation(0)
12-25 10:47:04.227 D/CameraHal(28971): camera_get_camera_info(1320): camera_get_camera_info(1320): camera_1 facing(1), orientation(0)
12-25 10:47:04.269 W/CAM_Log (29184): Tag RoundedThumbnailView is 1 chars longer than limit.
12-25 10:47:04.469 I/CAM_Profiler(29184): [309.185ms][ui] GUARD: CameraActivity.onCreateTasks - [232.924ms] setContentView()
12-25 10:47:04.488 I/CAM_Profiler(29184): [328.693ms][ui] GUARD: CameraActivity.onCreateTasks - [19.508ms] Configure Camera UI
12-25 10:47:04.502 W/CAM2PORT_AndCamAgntImp(29184): Releasing camera without any camera opened.
12-25 10:47:04.522 I/CameraManagerGlobal(29184): Connecting to camera service
12-25 10:47:04.526 I/CameraService(28971): getCameraCharacteristics: Switching to HAL1 shim implementation...
12-25 10:47:04.526 D/CameraHal(28971): camera_get_camera_info(1320): camera_get_camera_info(1320): camera_0 facing(0), orientation(0)
12-25 10:47:04.526 I/CameraService(28971): CameraService::connect call (PID 28971 "media", camera ID 0) for HAL version default and Camera API version 1
12-25 10:47:04.526 E/CameraService(28971): getCameraPriorityFromProcState: Received invalid process state -1 from ActivityManagerService!
12-25 10:47:04.526 D/CameraHal(28971): camera_get_camera_info(1320): camera_get_camera_info(1320): camera_0 facing(0), orientation(0)
解决方法:
进入设置 -> 应用里找到系统相机,清除缓存。
本文由职坐标整理并发布,希望对同学们有所帮助。了解更多详情请关注职坐标移动开发之Android频道!