google / cameraview

[DEPRECATED] Easily integrate Camera features into your Android app
Apache License 2.0
4.74k stars 1.03k forks source link

The Exception :Failed to start camera session #223

Open yanxinmiao opened 6 years ago

yanxinmiao commented 6 years ago

I got this issue on HuaWei Phone , but only the first time to use camera .

And I look up all of the issue, don't get solution .

This is the error loginfo :

 java.lang.RuntimeException: Failed to start camera session
                      at com.google.android.cameraview.Camera2.startCaptureSession(Camera2.java:511)
                      at com.google.android.cameraview.Camera2$1.onOpened(Camera2.java:76)
                      at android.hardware.camera2.impl.CameraDeviceImpl$1.run(CameraDeviceImpl.java:134)
                      at android.os.Handler.handleCallback(Handler.java:761)
                      at android.os.Handler.dispatchMessage(Handler.java:98)
                      at android.os.Looper.loop(Looper.java:156)
                      at android.app.ActivityThread.main(ActivityThread.java:6523)
                      at java.lang.reflect.Method.invoke(Native Method)
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
yanxinmiao commented 6 years ago

Please closed this issue , I has sloved it

Reference https://github.com/google/cameraview/issues/53

shellavitancol commented 6 years ago

How did you solved it? I am experiencing the same error.

yyyAndroid commented 4 years ago

I am experiencing the same error.