RN 經常碰見的錯誤與解決方案

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

解決方案鏈接

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。