CameraX crash: "The selected camera does not support the enabled use cases"

53 views
Skip to first unread message
Assigned to wenhu...@google.com by charco...@google.com

Kanhaiya

unread,
Jul 31, 2026, 2:22:21 AM (2 days ago) Jul 31
to Android CameraX Discussion Group

Hi CameraX team,

We're seeing an intermittent production crash with LifecycleCameraController:

IllegalStateException: The selected camera does not support the enabled use cases. Caused by: IllegalArgumentException: No available camera can be found.

The crash occurs while calling setCameraSelector() and CameraX fails to bind the use cases.

Has anyone encountered this issue? Under what conditions can CameraX report "No available camera can be found" even though the device has cameras? Are there known device-specific issues or recommended recovery strategies (retry, unbind/rebind, checking concurrent use cases, etc.)?

Any guidance would be greatly appreciated. Thanks!

Kanhaiya

unread,
Jul 31, 2026, 2:28:41 AM (2 days ago) Jul 31
to Android CameraX Discussion Group, Kanhaiya .
I am using cameraXVersion = "1.5.0"

Charcoal Chen

unread,
Jul 31, 2026, 2:35:07 AM (2 days ago) Jul 31
to Android CameraX Discussion Group, kanh...@getpowerplay.in
Hi,

The default CameraSelector of CameraController is CameraSelector#DEFAULT_BACK_CAMERA. Could you check whether the device has back camera? You may need to have some code to explicitly set CameraSelector#DEFAULT_FRONT_CAMERA to the CameraController if the device has only front camera and your app want to run with front camera when launching.

Kanhaiya

unread,
Jul 31, 2026, 2:52:31 AM (2 days ago) Jul 31
to Android CameraX Discussion Group, charco...@google.com, Kanhaiya .

User have all camera. 75% crash comes on Android 16 (V2439). LOG reads Cams:0 with no per-camera Id:/Lens: entries — so the camera set handed to select() was empty. CameraX found zero cameras at bind time, not "a device without a back camera." And LensFilter:0 is LENS_FACING_FRONT (LENS_FACING_FRONT = 0, BACK = 1), so the failing call was a switch to the front camera. A front-only device would log Cams:1 Id:1 Lens:0 with LensFilter:1. Cams:0.

Kanhaiya

unread,
Jul 31, 2026, 2:57:52 AM (2 days ago) Jul 31
to Android CameraX Discussion Group, Kanhaiya ., charco...@google.com
Cams:0 PhyId:null  Filters:1 Id:Identifier{value=java.lang.Object@89ebe6b} LensFilter:0
Reply all
Reply to author
Forward
0 new messages