an error occurred by CameraX.bindToLifecycle()

前端 未结 5 2071
执念已碎
执念已碎 2021-01-02 06:54

java.lang.IllegalArgumentException: No supported surface combination is found for camera device - Id : 0. May be attempting to bind too many use cases.

5条回答
  •  萌比男神i
    2021-01-02 07:18

    I got the same error when I tried to create imageCapture, videoCapture, mPreview or the analyzer with different settings between each other.

    Try to set in the builder setting the same parameters, e.g. if you want:

    setLensFacing(CameraX.LensFacing.BACK)
    

    Set in all the setting builders the same. This can fix your error but still, I don't know if the library support this feature jet.

提交回复
热议问题