2013-02-25 44 views
1

我正在尝试为Android使用Phonegap的蓝牙插件。我从there下载插件文件,并按照这些步骤:在Phonegap Android中添加蓝牙插件

  • 创建一个名为包com.phonegap.plugin.bluetooth
  • 复制的Bluetooth.java和BluetoothPlugin.java文件到这一点。
  • 增加<plugin name="BluetoothPlugin" value="com.phonegap.plugin.bluetooth.BluetoothPlugin"/>在plugins.xml

这样做后,我在this.ctx得到一个错误的BluetoothPlugin.java:

“类型不匹配:不能从LegacyContext转换为上下文” 。

我该如何解决这个问题?还在插件蓝牙和BluetoothPlugin文件夹给出,哪一个使用?

回答