Android Studio 3.0 Emulator: Could not lock voice for audioInputDeviceIOProc

夙愿已清 提交于 2020-03-13 04:14:22

问题


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


回答1:


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”

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

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

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

  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.




回答2:


  1. Launch “AVD Manager”
  2. Click the "Edit this AVD" of the virtual device you want to use in Android Virtual Device Manager.
  3. Click the "Show Advanced Settings" in (AVD's) Virtual Device Configuration.
  4. Go to "Emulated Performance" section in (AVD's) Virtual Device Configuration and select "Cold boot" of "Boot option:" and click "Finish".
  5. Relaunch your virtual device and rerun your app on the emulator(Virtual Device).


来源:https://stackoverflow.com/questions/45028210/android-studio-3-0-emulator-could-not-lock-voice-for-audioinputdeviceioproc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!