java.lang.RuntimeException: Fail to connect to camera service

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Komal
, 1 year ago
Fail to connect to camera service
via Stack Overflow by NickT
, 1 year ago
Fail to connect to camera service
via Stack Overflow by Skizit
, 1 year ago
Fail to connect to camera service
via phonesdevelopers.com by Unknown author, 1 year ago
java.lang.RuntimeException: Fail to connect to camera service
at android.hardware.Camera.native_setup(Native Method)
at android.hardware.Camera.(Camera.java:413)
at android.hardware.Camera.open(Camera.java:366)
at com.example.android.videorecordthumbnaildemo.MainActivity.initRecorder(MainActivity.java:76)
at com.example.android.videorecordthumbnaildemo.MainActivity.surfaceCreated(MainActivity.java:125)
at android.view.SurfaceView.updateWindow(SurfaceView.java:610)
at android.view.SurfaceView.access$000(SurfaceView.java:93)
at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:182)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:864)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2142)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1249)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6364)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:791)
at android.view.Choreographer.doCallbacks(Choreographer.java:591)
at android.view.Choreographer.doFrame(Choreographer.java:561)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:777)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)

Users with the same issue

3 times, 5 months ago
2 times, 9 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
20 times, 1 year ago
21 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.