Android 模拟器因音频问题而冻结?
今天我安装了最新版本的Eclipse、Android SDK和AVD插件。但我有一个繁琐的问题。当我想退出模拟器(使用 X 按钮)时,模拟器会冻结,我无法再单击那里的任何内容。显然这与声音有关,因为当我在控制台中执行“pulseaudio -k”时,模拟器退出。 由于这个事实,我尝试了以下方法来让模拟器至少正常运行:
在“首选项”->“Android”->“启动”->“启动”中。默认模拟器选项 -> -noaudio
和
运行配置 -> Android 应用程序 -> [应用]->目标->附加模拟器命令行选项 -> -noaudio
但没有任何帮助。模拟器保持冻结状态。实际上我想让音频运行,但关闭它也不起作用。那我能做什么呢?
Today I installed the latest version of Eclipse, Android SDK and AVD plugin. But I have a tedious problem. When I want to quit the emulator (with the X button), the emulator freezes and I can't click anything there anymore. Obviously it has something to do with the sound, because when I execute "pulseaudio -k" in console, the emulator quits.
Due to this fact, I tried the following to let the emulator at least run properly:
In Preferences->Android->Launch -> Default Emulator option -> -noaudio
and
Run Configuration -> Android Application -> [Application] -> Target -> Addidtional Emulator Command Line Options -> -noaudio
But nothing helps. Emulator stays frozen. Actually I want audio to run, but switching it off doesn't work either. So what can I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我回答了这个问题,但如果感兴趣的话:
您可能需要禁用音频输出,这对我来说并不理想,所以只需通过设置环境变量来选择 alsa (或 esd/oss)
QEMU_AUDIO_DRV=alsa
看起来没有办法在 hardware.ini 中指定音频驱动程序,因此最好的解决方案是转到 sdk 工具目录,在 emulator.real 中重命名模拟器并创建一个名为 emulator 的 shell 脚本,其中包含:
然后
chmod 755模拟器
I replied on the issue, but just if interested:
you may need to disable audio output instead, this is not desirable for me, so just select alsa (or esd/oss) by setting environment variable
QEMU_AUDIO_DRV=alsa
Looks like there is no way to specify audio drivers in hardware.ini so the best solution is going to sdk tools directory, rename emulator in emulator.real and make a shell script named emulator containing:
then
chmod 755 emulator
这是这里描述的问题:
http://code.google.com/p/android/issues/detail ?id=17294
有一个解决方法可以让您退出模拟器:
在虚拟设备中将“音频播放支持”和“音频录制支持”设置为“否”。
It's this problem described here:
http://code.google.com/p/android/issues/detail?id=17294
There is a workaround so that you can quit the emulator:
Set in your virtual devices "Audio Playback Support" and "Audio recording support" to "no".