Android 模拟器:无法启动网络摄像头以在模拟器中捕获图片

Android 模拟器:无法启动网络摄像头以在模拟器中捕获图片

问题描述:

我在 Android Studio 的 AVD 管理器中创建了一个 armeabi API 21 模拟器,将其设置为使用网络摄像头作为前置摄像头,然后启动它.问题是它无法打开它,因为我收到此错误:

I have created an armeabi API 21 emulator in the AVD manager in Android Studio, set it to use the webcam as a front camera, and launched it. The problem is that it's not able to open it, as I'm getting this error:

emulator: ERROR: camera_device_start_capturing: VIDIOC_STREAMON on camera '/dev/video0' has failed: Timer expired
emulator: ERROR: _camera_client_query_start: Cannot start camera '/dev/video0' for NV21[640x480]: Inappropriate ioctl for device

我该如何解决这个问题?

How can I solve this?

网络摄像头使用其他软件正常工作.操作系统为Ubuntu 14.04.

The webcam works normally using other software. The operative system is Ubuntu 14.04.

在 Android Studio 中,转到 AVD Manager,单击 Actions 中的编辑(铅笔)按钮.之后,在下一个出现的窗口中,单击高级设置,然后向下滚动并在相机选项中,选择前后网络摄像头.

In Android Studio, go to AVD Manager, click on edit (pencil) button in Actions. After that, in next appearing window, click on Advance settings, and then scroll down and in Camera options, select webcam for front and back.