错误:未find插件“EmailComposer”,或者不是CDVPlugin。 在config.xml中检查你的插件映射

我正在使用cordova2.8.1,并使用terminal生成的应用程序。

我在Plugins中添加了EmailComposer.h&EmailComposer.m文件

www中的 EmailComposer.js文件。

<script type="text/javascript" charset="utf-8" src="EmailComposer.js"></script> 

index.html中添加

在plist文件中,我添加了关键字: EmailComposer和值: EmailComposer in Plugins。

最后在config.xml中添加

 <feature name="Plugin"> <param name="ios-package" value="CDVPlugin"/> </feature> 

在button动作中调用方法

 Cordova.exec(null, null, 'EmailComposer','showEmailComposer', ["emailID@gmail.com", "message"]) 

但是我得到错误如下

 ERROR: Plugin 'EmailComposer' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml. -[CDVCommandQueue executePending] [Line 116] FAILED pluginJSON = [ "INVALID", "EmailComposer", "showEmailComposer", [ "emailID@gmail.com", "message" ] ] 

对此问题的任何build议在此先感谢。

在config.xml中试试这个:

 <feature name="EmailComposer"> <param name="ios-package" value="EmailComposer"/> </feature> 

第一个“EmailComposer”是JS端的这个插件的名称,第二个“EmailComposer”是本地(Objective-C)端的这个插件的类名。