RN 經(jīng)常碰見的錯(cuò)誤與解決方案

在寫RN的時(shí)候經(jīng)常出現(xiàn)一些莫名的錯(cuò)誤,遇到去網(wǎng)上搜索解決了,但是下次遇見還是不知道如何操作。所以在此記錄,為自己,也為大家行個(gè)方便.

問題:

node_modules/react-native/Libraries/WebSocket/libfishhook.a'

解決方案:

把libfishhook.a這個(gè)靜態(tài)庫刪除了重新添加


方案

問題:

'config.h' file not found

解決方案:

進(jìn)入到對應(yīng)的目錄,重新進(jìn)行一次文件的關(guān)聯(lián)關(guān)系建立

cd node_modules/react-native/third-party/glog-0.3.4

../../scripts/ios-configure-glog.sh

然后clean一下iOS項(xiàng)目,重新編譯解決.

問題:

iOS SplashScreen.h file not found

解決方案:

首先確定你的SplashScreen的真實(shí)類名字:
有的是SplashScreen,還有的是RNSplashScreen,可能不同版本


圖片

如果不是文件名問題,那么80%路徑?jīng)]有被引入導(dǎo)致的


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

解決方案鏈接

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容