【发布时间】:2019-08-08 09:19:07
【问题描述】:
我正在为 Android 开发 React Native,并且正在使用 Zeroconf。在过去的两天里,我一直在尝试迁移到 Expo SDK 34,并且已经解决了大部分问题。但是,我遇到了以下错误:
TypeError:TypeError:null 不是对象(评估“RNZeroconf.scan”)
-node_modules/react-native-zeroconf/dist/index.js:1:4265 在扫描中
在Expo SDK 32 上运行时我没有出现此错误。相关代码位:
import Zeroconf from 'react-native-zeroconf'
componentDidMount(){
this.zeroconf = new Zeroconf()
this.startDockScan()
}
startDockScan=()=>{
this.zeroconf.scan('http','tcp','local.'); //this is where the error traces back to
}
【问题讨论】:
标签: react-native expo zeroconf