Android Emulator: Unable to start webcam to capture picture in emulator

后端 未结 5 1605
长发绾君心
长发绾君心 2021-02-03 19:54

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 t

5条回答
  •  自闭症患者
    2021-02-03 20:26

    You can try to manually edit your AVD's configuration file under

    ~/.android/avd/yourAvdName/config.ini

    by adding this line:

    hw.camera=yes
    

    UPDATE

    You can try to specify the real resolution of your webcam:

    hw.camera.maxHorizontalPixels=XXX
    hw.camera.maxVerticalPixels=XXX
    

    Keep in mind that the default value for maxHorizontalPixels is 640 and for maxVerticalPixels is 480, so chaning this values may help you to solve your issues.

提交回复
热议问题