{errMsg: "send: fail sendUDPSocketMessage:fail function cannot run on service"}
const udp = wx.createUDPSocket()
const udpPort = udp.bind()
console.log("udp client port: " + udpPort) 打印: udp client port: undefined
udp.send({ address: '255.255.255.255', port: 8642, message: '111' })
{errMsg: "send: fail sendUDPSocketMessage:fail function cannot run on service"}
configure-network.js:254 Error: send: fail sendUDPSocketMessage:fail function cannot run on service
at Function.eval (configure-network.js:22)
at d (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:118602)
at X.eval (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:119052)
at X.emit (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:851105)
at Object.emit (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:856276)
at r.fail (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:2121339)
at d (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:118602)
at Object.eval [as fail] (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:119052)
at eval (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:863630)
at St (eval at Te.n.call.document (runtime.js?devtools_ignore=true:1), <anonymous>:2:863782)
开发工具不报错,手机报这个错误,有人解决了吗