ReactNative報錯問題彙總,錯誤解決

  • 1.Svn checkout下來的文件,如果在在Mac電腦上運行,項目運行的時候出現以下錯誤 ,但是模擬器或者android環境已經安裝完全,找不到其他問題

Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment’的錯誤

解決方法:在終端或黑窗口中輸入以下代碼+當前運行項目的路徑

sudo chmod -R 777 “項目文件目錄”
  • 2.ScrollView嵌套,ListView或FlatList數據不顯示,需要碰/滑一下才會顯示
removeClippedSubviews={false}
  • 3 . React Native 日常報錯 ‘config.h’ file not found

解決方法:

cd node_modules/react-native/third-party/glog-0.3.4
../../scripts/ios-configure-glog.sh

clean the project and build again, the error is gone
其實執行 .sh 命令之後Terminal界面的一些處理流程,我們不難看出,這個命令是check .h頭文件的引用情況,然後建立關聯關係

  • 4 . Build input file cannot be find: '/node_module/Libraries/WebSocket/libfishhook.a’

類似這種報錯,算是一種典型
在這裏插入圖片描述
解決方法:
選中Libraries下方項目 選中target build phases Link Binary With Libraries 重新添加依賴
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章