Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Emulator 4.2 (API Level 17) "Unfortunately camera has stopped" When try to access camera from the main menu

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 !!!

like image 373
PDS Avatar asked Feb 11 '13 14:02

PDS


1 Answers

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)

Android emulator no camera selected

like image 121
Anders Eggers-Krag Avatar answered Oct 07 '22 11:10

Anders Eggers-Krag