Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webcam in Android emulator: "Cannot start camera" and "Result too large"

I have an Android 4.1.2 AVD that needs to use the camera. I tried using my webcam as a substitute in the emulator, but I get this error:

[2012-11-16 10:35:37 - Emulator] emulator: ERROR: _camera_client_query_start: Cannot start camera 'AndroidEmulatorVC0' for NV21[640x480]: Result too large

How do I fix this error?

like image 411
Pieter Avatar asked Nov 13 '22 17:11

Pieter


1 Answers

Goto window -> AVD Manager -> select your AVD name ->click Edit button -> Abstracted LCD density click value drop down value select 160.

To enable Camera in your Android Emulator, just add following highlighted code in your AVD’s config.ini file. You can find the config.ini file under your user directory/.android folder.

File: ~/.android/config.ini

hw.lcd.density=160
skin.name=HVGA
skin.path=platforms\android-9\skins\HVGA
hw.cpu.arch=arm
abi.type=armeabi
vm.heapSize=24
image.sysdir.1=platforms\android-9\images\
hw.camera=yes
sdcard.size=64M
...
like image 71
Android Avatar answered Nov 15 '22 06:11

Android