在寫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