我正在尝试扫描ios当前项目中的条形码。为此,我使用了 Phone Gap 插件。我按照链接正确添加了文件:Barcode Link
我在项目的 www 文件夹中添加了 Barcodescanner.js 文件。但是当我按下按钮扫描 ipad 2 中的条形码时,出现以下错误:
ERROR: Plugin
'org.apache.cordova.barcodeScanner' not found, or is not a CDVPlugin.
Check your plugin mapping in Cordova.plist
似乎没有获取 barcodescanner.js 文件的正确路径。我也正确地在index.html 文件中添加了路径。
有人可以帮忙吗?
最佳答案
阿林达姆,
我现在可以使用了。我做了什么
- 像在 link 中那样更改 Cordova.plist 中的 key
- 按照上述同一链接中的操作更改 Barcodescanner.js 的代码
- 不仅将 .cpp 、 .h 和 .mm 文件添加到我的工作区目录中的文件夹中,还将它们添加到我的 xcode 项目中:
Right Click on "Plugins" -> Add Files To projectname -> Select the .cpp , .h and .mm file from my Plugins folder in the project Directory -> Set "Create Folder references for any added folders" and "add to Target projectname" -> Click "Add"
将文件添加到我的项目后,扫描仪开始工作。
希望这也能解决你的问题。我正在使用 Cordova 1.8.1。
关于ios - Cordova 2.0 中的 ios 条形码扫描仪插件未找到插件 'org.apache.cordova.barcodeScanner',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12052142/