在a previous post中,在连接网络摄像头的模拟器中启动相机应用程序时出现此错误:
CameraService::connect X (pid 702) rejected (invalid cameraId 0).
更新开发工具后,我得到了另一个错误(然后,在制作新的模拟器后,我再次遇到第一个错误):
03-15 03:44:04.272: E/EmulatedCamera_QemuClient(40): queryStart: Query failed: Cannot start the camera
03-15 03:44:04.272: E/EmulatedCamera_QemuDevice(40): startDevice: Unable to start device 'AndroidEmulatorVC0' for NV21[640x480] frames
[...]
03-15 03:31:15.922: E/AndroidRuntime(785): FATAL EXCEPTION: Thread-76
03-15 03:31:15.922: E/AndroidRuntime(785): java.lang.RuntimeException: startPreview failed
03-15 03:31:15.922: E/AndroidRuntime(785): at com.android.camera.Camera.startPreview(Camera.java:1867)
03-15 03:31:15.922: E/AndroidRuntime(785): at com.android.camera.Camera.access$3100(Camera.java:87)
03-15 03:31:15.922: E/AndroidRuntime(785): at com.android.camera.Camera$5.run(Camera.java:1112)
03-15 03:31:15.922: E/AndroidRuntime(785): at java.lang.Thread.run(Thread.java:856)
03-15 03:31:15.922: E/AndroidRuntime(785): Caused by: java.lang.RuntimeException: startPreview failed
03-15 03:31:15.922: E/AndroidRuntime(785): at android.hardware.Camera.startPreview(Native Method)
03-15 03:31:15.922: E/AndroidRuntime(785): at com.android.camera.Camera.startPreview(Camera.java:1864)
03-15 03:31:15.922: E/AndroidRuntime(785): ... 3 more
导致此错误的原因是什么?我怎样才能最好地解决这个问题呢?