ReactNative錯誤記錄:

1.使用pod集成RN時報錯:'jsireact/JSIExecutor.h' file not found

參考:
https://stackoverflow.com/questions/54460885/jsireact-jsiexecutor-h-file-not-found

圖片來自stackoverflow

原因:

jsiexecutor的頭文件路徑錯誤

解決方法:

修改node_modules/react-native/React.podspec中的jsiexecutor頭文件路徑如下,然后重新pod install 或者pod update:

s.subspec "jsiexecutor" do |ss|
    ss.dependency             "React/cxxreact"
    ss.dependency             "React/jsi"
    ss.dependency             "Folly", folly_version
    ss.compiler_flags       = folly_compiler_flags
    ss.source_files         = "ReactCommon/jsiexecutor/jsireact/*.{cpp,h}"
    ss.private_header_files = "ReactCommon/jsiexecutor/jsireact/*.h"
    ss.header_dir           = "jsireact"
    ss.pod_target_xcconfig  = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\", \"$(PODS_TARGET_SRCROOT)/ReactCommon/jsiexecutor\"" }
  end

2.mutex.h中#include "config.h"提示not found

image.png

解決方法:

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

原因:

該腳本是檢測頭文件的引用情況

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

相關(guān)閱讀更多精彩內(nèi)容

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