【发布时间】:2015-07-12 18:59:18
【问题描述】:
我将此插件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");
导致以下错误:
file:///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.js,org.bcsphere.bcorg.bcsphere/bc.js
【问题讨论】:
标签: cordova phonegap-plugins phonegap-build