Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio's emulator has an error "can't connect to camera"

I'm connecting a webcam to my emulator by setting the front camera to "webcam0" in the AVD Manager. When I launch the webcam from Android studio's AVD manager or using emulator -camera-front webcam0 , I get the following window: enter image description here

and when the emulator has showed that is an error enter image description here

Please help me how to fix that.

like image 451
Lovely ToonZ Avatar asked Apr 25 '16 05:04

Lovely ToonZ


2 Answers

Go to Android Virtual device manager>>select the emulator>>click edit>>select Advanced Setting>>camera select as Emulated rather than Webcam0 .

like image 130
Sushrita Avatar answered Sep 16 '22 12:09

Sushrita


I got this error on new android emulator and was able to fix it by selecting emulated options for both Front and Back camera and clearing Camera App's Cache & data.

like image 36
mallaudin Avatar answered Sep 19 '22 12:09

mallaudin