Pierre Thibault
Pierre Thibault

Reputation: 2073

Authorization problem for Android emulator on macOS Mojave?

I am unable to run my Android application on the emulator from Android Studio on macOS Mojave. But I have no problem running the same application using the physical device connected to the USB port. I think the problem might be that the emulator is not authorized to access the webcam of my Macbook Pro. On the terminal:

$ emulator -webcam-list                                                                                                                                                                                                                                                
List of web cameras connected to the computer:
Camera 'webcam0' is connected to device 'CC24342DY7CF6VVDK' on channel 0 using pixel format 'YUYV'

But when I start the emulator on the CLI, I have this message:

$ emulator -avd Pixel_2_API_29                                
emulator: WARNING: Camera name 'webcam0' is not found in the list of connected cameras.
Use '-webcam-list' emulator option to obtain the list of connected camera names.

There is an issue here about this problem: https://youtrack.jetbrains.com/issue/IDEA-219288

But my terminal is authorized to access the webcam. I can run other applications accessing the camera from the CLI without a problem.

So I think this is something wrong. Any suggestion?

Upvotes: 0

Views: 421

Answers (1)

Pierre Thibault
Pierre Thibault

Reputation: 2073

Note: Currently, MediaRecorder does not work on the emulator.

This has nothing to do with macOS security.
https://developer.android.com/reference/android/media/MediaRecorder

Upvotes: 1

Related Questions