I'm consistently getting the error
Not bound to a valid Camera
when attempting to implement the imageCapture use case. I'm implementing the feature in Java following the camerax tutorial here.
The preview use case binds correctly and I can access the camera when I launch the activity, but when I tap on the "take photo" button, I get the error below:
Photo capture failed: ${exception.message}
androidx.camera.core.ImageCaptureException: Not bound to a valid Camera [ImageCapture:androidx.camera.core.ImageCapture-9aad1b57-8fb6-4a6e-b528-9347343369b6]
at androidx.camera.core.ImageCapture.lambda$sendImageCaptureRequest$6$ImageCapture(ImageCapture.java:825)
at androidx.camera.core.-$$Lambda$ImageCapture$2B91NcXQyr59NDscigcxsZb94mc.run(Unknown Source:4)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Anyone facing a similar issue? Any pointers?