udp.bind开发工具报错怎么解决?
手机型号,荣耀V7,安卓版本9(ios12也一样)
微信版本:7.0.6
开发工具调试:(Nightly v1.02.1908092)(之前稳定版也同样报错)
代码:
const wx_udp = wx.createUDPSocket();
console.log(“UDP创建完成”);
console.log(wx_udp);
const wx_udpport = wx_udp.bind();
console.log(“UDP端口绑定”);
console.log(wx_udpport);
wx_udp.send({
address: ‘192.168.1.128’,
port: 8006,
message: ‘How are you’,
success: function (res) {
console.log(“发送成功”)
},
fail: function (err) {
console.log(“发送失败”)
}
})
看代码和console窗口的消息,WAService.js是作什么的,执行到这里就报错了