I'm using Android 4.2 (API Level 17) emulator.
Whenever I clicked on the Camera, I got the following error message :
Unfortunately, camera has stopped
These are the logcat errors :
E/CameraService(40): CameraService::connect X (pid 862) rejected (invalid cameraId 0).
E/CameraHolder(862): fail to connect Camera
E/CameraHolder(862): java.lang.RuntimeException: Fail to connect to camera service
E/CameraHolder(862): at android.hardware.Camera.native_setup(Native Method)
E/CameraHolder(862): at android.hardware.Camera.<init>(Camera.java:340)
E/CameraHolder(862): at android.hardware.Camera.open(Camera.java:302)
E/CameraHolder(862): at com.android.camera.CameraHolder.open(CameraHolder.java:131)
E/CameraHolder(862): at com.android.camera.Util.openCamera(Util.java:267)
E/CameraHolder(862): at com.android.camera.Camera$4.run(Camera.java:1100)
E/AndroidRuntime(862): java.lang.RuntimeException: openCamera failed
E/AndroidRuntime(862): at com.android.camera.Util.openCamera(Util.java:272)
E/AndroidRuntime(862): at com.android.camera.Camera$4.run(Camera.java:1100)
E/AndroidRuntime(862): Caused by: com.android.camera.CameraHardwareException: java.lang.RuntimeException: Fail to connect to camera service
E/AndroidRuntime(862): at com.android.camera.CameraHolder.open(CameraHolder.java:135)
E/AndroidRuntime(862): at com.android.camera.Util.openCamera(Util.java:267)
E/AndroidRuntime(862): Caused by: java.lang.RuntimeException: Fail to connect to camera service
E/AndroidRuntime(862): at android.hardware.Camera.native_setup(Native Method)
E/AndroidRuntime(862): at android.hardware.Camera.<init>(Camera.java:340)
E/AndroidRuntime(862): at android.hardware.Camera.open(Camera.java:302)
E/AndroidRuntime(862): at com.android.camera.CameraHolder.open(CameraHolder.java:131)
I tried various solutions. But no luck :(
No one has given a working solution for this problem so far. Please give me a hint
Webcam : Dell Integrated webcam
OS : windows 8 Professional 64 bit version
Cheers !!!
You probably don't care anymore but this was one of the first ones i got when i googled the same problem so in case anyone else runs into this i found that my problem was that i had selected no camera in the AVD (seems to be default)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With