Camera.open() returns null

后端 未结 3 911
粉色の甜心
粉色の甜心 2020-12-16 11:15

When I call mCamera = Camera.open() it returns null, what could be causing this? My device is the Nexus 7.

I already have the permissions set in my

3条回答
  •  盖世英雄少女心
    2020-12-16 11:53

    I solved this issue by following below steps.

    1. Open the "AVD Manager" and select the virtual device you are using

    2. Click on the "Edit" button Click on edit button

    3. In the "Hardware" section, select "New" and add "Configures camera facing back" and click Ok.

    4. In the dropdown next to the entry, select "webcam0" or the one corresponding to the camera you want to use Select the camera you want to use

    5. Stop the AVD and restart again.

提交回复
热议问题