2016-12-25 135 views
0

我使用的PhoneGap,我想用這個米 插件:https://github.com/srehanuddin/Cordova-Plugin-Bluetooth-Printer科爾多瓦插件不工作(不定義)

Unfortunelly控制檯打印該信息時,我試圖使用這個插件:

Uncaught ReferenceError: BTPrinter is not defined

但如果我使用CMD和檢查插件:...去應用程序文件夾和類型phonegap plugin list 我看到:cordova-plugin-bluetooth-printer 0.0.1-dev "BluetoothPrinter"

你知道哪裏可以解決問題嗎?

confix.xml:

`<gap:plugin name="cordova-plugin-bluetooth-printer" />` 

謝謝!

+0

取決於您的構建是如何設置了很多。最有可能的是,任何進程都不會將插件src複製到適當的位置,或者實際運行的應用程序無法查看庫存在的任何位置。 –

+0

我使用了Phonegap桌面應用程序(只需點擊make new project)。 –

+0

應用程序文件夾包含這些子文件夾:.cordova,鉤子,平臺,插件(包含藍牙打印機插件),紅色,www,confix.xml –

回答

0

更新: 如果我嘗試通過build.phonegap.com建設:

Error - Plugin error (you probably need to remove plugin files from your app): //github.com/srehanuddin/Cordova-Plugin-Bluetooth-Printer.git#1.0.0": support for subdirectories is deprecated and will be removed in [email protected] Fetching plugin "https://github.com/srehanuddin/Cordova-Plugin-Bluetooth-Printer.git" via git clone Cloning full repository Failed to fetch plugin https://github.com/srehanuddin/Cordova-Plugin-Bluetooth-Printer.git via git. Either there is a connection problems, or plugin spec is incorrect: Error: git: Command failed with exit code 1 Error output: error: pathspec '1.0.0' did not match any file(s) known to git. -