简体   繁体   English

Android Emulator的音频停止工作

[英]Android Emulator's Audio stopped working

I'm using Eclipse and the Android Emulator on my Mac. 我在Mac上使用Eclipse和Android Emulator。

My app has a background audio. 我的应用程序有背景音频。 It was working before but today when I started Eclipse again, there was no audio. 以前可以使用,但是今天当我再次启动Eclipse时,没有音频。

I tried to delete/recreate new virtual devices from API level 15 to API level 18 but it didn't work. 我试图从API级别15到API级别18删除/重新创建新的虚拟设备,但是它不起作用。

There is no error in the logcat and the app runs fine.. apart from the fact that there is no audio. 在logcat中没有错误,应用程序运行正常。除了没有音频的事实。

Mac's audio is working. Mac的音频正常工作。 I can hear songs on it. 我可以听到歌曲。

The avd has the volume bar set to high but for some reason there is no audio. avd的音量栏设置为高,但由于某种原因,没有音频。

I am not using snapshot, I am using GPU and I did upgrade my Android SDK manager to the latest API level recently.. Could that be a problem? 我没有使用快照,正在使用GPU,并且最近确实将Android SDK管理器升级到了最新的API级别。这可能是问题吗?

One more way to solve your issue might be using new Genymotion Android Emulator , it is available for Mac too and it is faster than Google's Android Emulator . 解决问题的另一种方法可能是使用新的Genymotion Android Emulator ,它也可用于Mac,并且比Google's Android Emulator更快。 I have just tested and audio working fine on Windows, I am using latest Android SDK Tools r22.0.5 我刚刚在Windows上进行了测试,音频工作正常,我正在使用最新的Android SDK Tools r22.0.5

我遇到了同样的问题,我通过转到Genymotion并选择模拟器来解决此问题,然后设置-> ADB->使用自定义Android SDK工具

some Way to solveing 解决的一些方法
1-Check your setting of emulator for hw.audioInput=yes 1-检查您的模拟器设置是否为hw.audioInput=yes
2-Download again your platform and make new emulator 2-再次下载您的平台并制作新的模拟器
3-Download again last sdk and replace 3-再次下载最后一个SDK并替换
4-Try using different VM with different versions of sdk 4-尝试将不同的VM与不同版本的SDK配合使用

The problem is due to the support libraries that you might have missed while downloading the API 18.. 问题是由于下载API 18时可能缺少的支持库所致。

Try installing the support libraries too and then create a new AVD and check it should work. 也尝试安装支持库,然后创建一个新的AVD并检查它是否可以工作。

in linux (Arch linux) just add -audio alsa switch on target tab(Run configuration) 在Linux(Arch linux)中,只需在目标选项卡上添加-audio alsa开关(运行配置)

that's work for me fine 那对我来说很好

if not work you may try -audio oss 如果不行,您可以尝试-audio oss

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM