在写RN的时候经常出现一些莫名的错误,遇到去网上搜索解决了,但是下次遇见还是不知道如何操作。所以在此记录,为自己,也为大家行个方便.
问题:
node_modules/react-native/Libraries/WebSocket/libfishhook.a'
解决方案:
把libfishhook.a这个静态库删除了重新添加
方案
问题:
'config.h' file not found
解决方案:
进入到对应的目录,重新进行一次文件的关联关系建立
cd node_modules/react-native/third-party/glog-0.3.4
../../scripts/ios-configure-glog.sh
然后clean一下iOS项目,重新编译解决.
问题:
iOS SplashScreen.h file not found
解决方案:
首先确定你的SplashScreen的真实类名字:
有的是SplashScreen,还有的是RNSplashScreen,可能不同版本
图片
如果不是文件名问题,那么80%路径没有被引入导致的
For anyone else that got stuck on this, make sure you do step 4 of the manual installation, even if you do the automatic installation with react-native link.
To fix 'SplashScreen.h' file not found, you have to select your project → Build Settings → Search Paths → Header Search Paths to add:
$(SRCROOT)/../node_modules/react-native-splash-screen/ios