java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.johncarlo.flashlight/com.example.johncarlo.flashlight.MainActivity}: 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

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by Jc Ferreras
, 1 year ago
Unable to start activity ComponentInfo{com.example.johncarlo.flashlight/com.example.johncarlo.flashlight.MainActivity}: java.lang.RuntimeException: Fail to connect to camera service
via Stack Overflow by user2749218
, 2 years ago
Unable to start activity ComponentInfo{com.demi/demi.bussiness.MakePhotoActivity}: java.lang.RuntimeException: Fail to get camera info
via Stack Overflow by Rashiq
, 2 years ago
Unable to start activity ComponentInfo{com.erachnida.restaurant.versionoct/com.erachnida.restaurant.versionoct.TabSample}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.erachnida.restaurant.versionoct/com.erachnida.restaurant.versionoct.MainActivity}: java.lang.NullPointerException
via Stack Overflow by David Eduardo Ramirez
, 2 years ago
Unable to start activity ComponentInfo{com.raigo.itivamin/com.raigo.itivamin.Bartabs}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.raigo.itivamin/com.raigo.itivamin.ObjetivosActivity}: java.lang.NullPointerException
via Stack Overflow by bouslama oumayma
, 1 year ago
Unable to start activity ComponentInfo{com.android_examples.com.tabhost/com.android_examples.com.tabhost.MainActivity}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android_examples.com.tabhost/com.android_examples.com.tabhost.TabActivity_1}: java.lang.NullPointerException
via scriptscoop.com by Unknown author, 2 years ago
Unable to start activity ComponentInfo{com.example.complexdatepicker/com.example.complexdatepicker.MainActivity}: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.complexdatepicker/com.example.complexdatepicker.Home}: java.lang.NullPointerException
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.johncarlo.flashlight/com.example.johncarlo.flashlight.MainActivity}: java.lang.RuntimeException: Fail to connect to camera service
at android.hardware.Camera.native_setup(Native Method)
at android.hardware.Camera.(Camera.java:365)
at android.hardware.Camera.open(Camera.java:338)
at com.example.johncarlo.flashlight.MainActivity.onCreate(MainActivity.java:49)
at android.app.Activity.performCreate(Activity.java:5117)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2150)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2236)
at android.app.ActivityThread.access$600(ActivityThread.java:145)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1238)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5099)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:803)

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

Write tip

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