PhoneGap错误:未找到插件'LowLatencyAudio',或者不是CDVPlugin

时间:2014-03-11 03:10:18

标签: ios cordova phonegap-plugins

我们正在使用PhoneGap 3.4。我们按照此处的说明安装了LowLatencyAudio插件:https://github.com/triceam/LowLatencyAudio

但是,我们看到以下错误:

2014-03-10 19:59:25.960 S[7828:60b] CDVPlugin class LowLatencyAudio (pluginName: LowLatencyAudio) does not exist.
2014-03-10 19:59:25.962 S[7828:60b] ERROR: Plugin 'LowLatencyAudio' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2014-03-10 19:59:25.963 S[7828:60b] -[CDVCommandQueue executePending] [Line 127] FAILED pluginJSON = [
"INVALID",
"LowLatencyAudio",
"preloadFX",
[
"sounds\/right.mp3",
"sounds\/wrong.mp3"
]
]

映射确实存在于config.xml中。我们用以下代码调用代码:

LowLatencyAudio.preloadFX( GUESS_RIGHT_SOUND, GUESS_RIGHT_SOUND);
LowLatencyAudio.preloadFX( GUESS_WRONG_SOUND, GUESS_WRONG_SOUND);

我们也尝试过:

PGLowLatencyAudio.preloadFX( GUESS_RIGHT_SOUND, GUESS_RIGHT_SOUND);
PGLowLatencyAudio.preloadFX( GUESS_WRONG_SOUND, GUESS_WRONG_SOUND);

两种方法都失败了,只有LowLatencyAudio一种方法会生成错误消息。

1 个答案:

答案 0 :(得分:0)

在这里找到答案:Cordova iOS plugins not found

确保插件源类具有“目标成员资格”,包括正确的应用程序。