无法在Android中使用PhoneGap条形码扫描仪插件

无法在Android中使用PhoneGap条形码扫描仪插件,android,cordova,phonegap-plugins,Android,Cordova,Phonegap Plugins,我按照程序在我的Android项目中安装了phonegap插件 Cordova(PhoneGap)的版本是2.3.0,我从下载插件 这是我尝试调用条形码扫描仪的代码: window.plugins.barcodeScanner.scan(success, function(error) { alert("scanning failed: " + error) } ); 当我按下按钮调用该方法时,出现以下错误: scanning failed : Cl

我按照程序在我的Android项目中安装了phonegap插件

Cordova(PhoneGap)的版本是2.3.0,我从下载插件

这是我尝试调用条形码扫描仪的代码:

  window.plugins.barcodeScanner.scan(success,
     function(error) {
        alert("scanning failed: " + error)
     }
  );
当我按下按钮调用该方法时,出现以下错误:

scanning failed : Class not found.
我做错了什么?

添加行:

<plugin name="BarcodeScanner" value="com.phonegap.plugins.barcodescanner.BarcodeScanner"/>


添加到您的res/xml/config.xml文件。

将该行添加到您的res/xml/config.xml文件:

<feature name="BarcodeScanner"><param name="android-package" value="com.phonegap.plugins.barcodescanner.BarcodeScanner" /></feature>

我确信我已经做到了。我还向AndroidManifest.xml添加了以下权限: