6

我正在使用 Android 4.2(API 级别 17)模拟器。

每当我点击相机时,我都会收到以下错误消息:

不幸的是,相机已停止

这些是 logcat 错误:

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)

我尝试了各种解决方案。但没有运气:(

到目前为止,还没有人针对这个问题给出一个可行的解决方案。请给我一个提示

  • 网络摄像头:戴尔集成网络摄像头

  • 操作系统:windows 8 Professional 64位版本

干杯!!!

4

1 回答 1

3

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

于 2013-07-10T16:51:39.327 回答