Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio 3.0 Emulator: Could not lock voice for audioInputDeviceIOProc

I seem to get this error while building my app on my emulator. I do not know what it the cause of it and it seems affecting my app which causes it my app to crash on the emulator.

Emulator: coreaudio: Could not lock voice for audioInputDeviceIOProc
Emulator: Reason: Invalid argument

like image 778
J Adonai Dagdag Avatar asked Jul 11 '17 07:07

J Adonai Dagdag


People also ask

Why is the emulator in Android Studio not working?

If the emulator fails to launch due to the error vulkan-1. dll cannot be found , you probably need to update the emulator. To update the emulator in Android Studio, go to Tools > SDK Manager and install the latest stable version of Android platform.

How do I fix the emulator process for AVD has terminated?

1. Create any Emulator configuration in Device Manager, start it, won't start and terminates immediately. 2. Uninstall Android Emulator tools from SDK Manager, re-install the same tools, create emulator configuration, start the same, won't start and terminates immediately.


1 Answers

Audio input in the Android emulator is not super reliable right now. Until it's fixed you can disable it with these steps:

  1. Launch “AVD Manager”

enter image description here

  1. On the crashing image, click the downward facing icon in the actions column and select “Show on Disk”

enter image description here

  1. In the folder that was opened should be a config.ini file, open it in your favorite text editor

enter image description here

  1. Change (or add) hw.audioInput=yes to hw.audioInput=no

enter image description here

  1. Save and close config.ini and relaunch that Android emulator image—it should now work without audio input errors

Sidenote: I had issues that are possibly related and also chose to add hw.audioOutput=no directly after hw.audioInput=no. You may want to try that if hw.audioInput=no doesn't solve it for you.

like image 149
Tim Trueman Avatar answered Dec 10 '22 08:12

Tim Trueman