android-emulator - Android Studio 3.0 模拟器 : Could not lock voice for audioInputDeviceIOProc

标签 android-emulator avd android-studio-3.0

在我的模拟器上构建我的应用程序时,我似乎遇到了这个错误。我不知道它的原因是什么,它似乎影响了我的应用程序,导致我的应用程序在模拟器上崩溃。

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

最佳答案

Android 模拟器中的音频输入现在不是非常可靠。在修复之前,您可以通过以下步骤禁用它:

  • 启动“AVD 管理器”

  • enter image description here
  • 在崩溃的图像上,单击操作列中朝下的图标,然后选择“在磁盘上显示”

  • enter image description here
  • 在打开的文件夹中应该是 config.ini文件,在您喜欢的文本编辑器中打开它

  • enter image description here
  • 更改(或添加)hw.audioInput=yeshw.audioInput=no

  • enter image description here
  • 保存并关闭 config.ini并重新启动该 Android 模拟器镜像——它现在应该可以正常工作而不会出现音频输入错误

  • 旁注:我遇到了可能相关的问题,也选择添加 hw.audioOutput=no直接在 hw.audioInput=no 之后.如果 hw.audioInput=no,您可能想尝试一下不为你解决。

    关于android-emulator - Android Studio 3.0 模拟器 : Could not lock voice for audioInputDeviceIOProc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45028210/

    相关文章:

    android - 如何从命令行生成 android debug.keystore?

    Android 模拟器的窗口位置不正确

    android - 目标 google API 和目标 android 之间的区别

    安卓模拟器 : how to find out if hardware virtualization feature is used?

    android - 无法生成签名的 apk? [发生重复平台类错误]

    android-studio - 在Android Studio中重建项目时出错

    android - 主源集中的重构不会传播到非 Activity 构建变体

    java - Android:不幸的是<应用程序名称>已停止

    android - 录制/播放声音时音质不佳 - Android SDK

    android - 更改虚拟 Android 设备的 Wifi 名称