的冰淇淋三明治运行时异常

的冰淇淋三明治运行时异常

本文介绍了Android的展台(音效)的冰淇淋三明治运行时异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在样品AudioFxDemo.java,配备了SDK,我收到了

In the sample AudioFxDemo.java, provided with the SDK, I get a

java.lang.RuntimeException: Cannot initialize Visualizer engine, error: -4

试图创建android.media.audiofx.Visualizer时

when trying to create the android.media.audiofx.Visualizer

mVisualizer = new Visualizer(mMediaPlayer.getAudioSessionId());

(AudioFxDemo.java:173)。

(AudioFxDemo.java:173).

据我所看到的,在本土code ,(线路266 FF)的错误也试图创建android.media.audiofx.Equalizer时发生:

As far as I can see, the error originates in the native code, (lines 266 ff.) An error also happens when trying to create the android.media.audiofx.Equalizer:

mEqualizer = new Equalizer(0, mMediaPlayer.getAudioSessionId());

(AudioFxDemo.java:98)

(AudioFxDemo.java:98)

我收到了

java.lang.IllegalArgumentException: Effect type: 0bed4300-ddd6-11db-8f34-0002a5d5c51b not supported.

我宣布我的项目如下权限:

I have declared the following permissions for my project:

<uses-permission android:name="android.permission.RECORD_AUDIO"
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>

任何想法可能什么错在这里?

Any ideas what might be going wrong here?

这似乎是与API级中的问题。我对姜饼没有问题(API等级10)。我只测试上的虚拟设备。

It seems to be a problem with the API level. I have no problems on Gingerbread (API Level 10). I have only tested on virtual devices.

推荐答案

这似乎是一个问题的模拟器。我已经测试运行的是Android 4.0.3在实际设备上和它的工作就好了。

This seems to be an issue with the Emulator. I have tested on an actual device running Android 4.0.3 and it worked just fine.

这篇关于Android的展台(音效)的冰淇淋三明治运行时异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 04:25