收藏
回答

为什么所有蓝牙API都提示is not a function?

设备:安卓平板荣耀侍卫T106

组件名称:蓝牙API

微信版本:安卓,7.0.6

基础库版本:2.8.3

问题:

为什么所有蓝牙API都提示is not a function??微信是从应用宝下载的,在微信直接下载的7.0.10,提示解析程序包时出现问题。

TypeError: wx.offBLEConnectionStateChange is not a function

TypeError: wx.offBluetoothDeviceFound is not a function

TypeError: wx.offBluetoothAdapterStateChange is not a function

TypeError: wx.offBLECharacteristicValueChange is not a function




最后一次编辑于  2020-05-30
回答关注问题邀请回答
收藏

1 个回答

  • xplee
    xplee
    2020-05-30

    你用到的这几个API wx.offBLEConnectionStateChange、wx.offBluetoothDeviceFound、wx.offBluetoothAdapterStateChange、wx.offBLECharacteristicValueChange都需要基础版本>=2.9.0,而你调试用的设备基础版本是2.8.3

    2020-05-30
    有用
    回复 2
    • Waibil Feng
      Waibil Feng
      2020-05-30
      好的,明白了。。。谢谢了!!!
      2020-05-30
      回复
    • Waibil Feng
      Waibil Feng
      2020-05-30
      我已经设置为2.9.2了,但是,那台平板又没得升级安卓操作系统。下载的微信最新版本又安装不了。。很烦。
      2020-05-30
      回复
登录 后发表内容
问题标签