cordova需要一个插件

时间:2015-07-12 18:59:18

标签: cordova phonegap-plugins phonegap-build

我已将此插件https://github.com/bcsphere/bluetooth添加到我的应用中:

phonegap plugin add https://github.com/bcsphere/bluetooth.git 

我正在关注他们的教程: https://github.com/bcsphere/tutorial/blob/master/chapter01/js/index.js#L17

据我所知,该插件的 www 文件夹将与我应用的 www 文件夹合并?那么我该如何正确导入模块,因为

var BC = window.BC = cordova.require("org.bcsphere.bcjs");

导致以下错误:

  

文件:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/cordova.js:59

     

未找到未找到的org.bcsphere.bcjs模块

如果您查看插件的 www 文件夹https://github.com/bcsphere/bluetooth/tree/master/www,您可以看到所有可用的模块。我需要主要的:https://github.com/bcsphere/bluetooth/blob/master/www/org.bcsphere/bc.js

修改

我还尝试了org.bcsphere.bc.jsorg.bcsphere.bc org.bcsphere/bc.js

1 个答案:

答案 0 :(得分:0)

所以我不完全确定,因为我无法尝试但是从逻辑上认为它会是

org.bcsphere/bc.js

正确?