Camera in android emulator

2019-05-08 04:09发布

问题:

I use android SDK 4.0.3 and eclipse Indigo and I'm trying to develop an application which uses a camera. When I take a photo, this message appears:

Unfortunately, camera has stopped.

In the eclipse console:

emulator: ERROR: _camera_client_query_frame: Unable to obtain first video frame from the camera '/dev/video0' in 2009 milliseconds: Resource temporarily unavailable.

My OS is Debian Squeeze. What can I do? Thanks.

回答1:

In emulator camera does not work properly .You must try it on Real Device.



回答2:

As Shahzad imam said, you can't use camera on emulator.

But if can't buy real device and you're really need camera you can try to translate video to network from your PC and then handle it in Android, as it a real camera. Or, if you just need photo, you can use some picture instead.