我正在使用React Native構建iOS應用程序。這樣做,我安裝了一個react-native module並在模塊教程之後配置了我的iOS xcode項目(主要是cocoapods)。現在,當我運行react-native run-ios
,我得到這個錯誤堆棧:React Native iOS構建失敗:體系結構x86_64的未定義符號
Undefined symbols for architecture x86_64:
"_JSNoBytecodeFileFormatVersion", referenced from:
+[RCTJavaScriptLoader loadBundleAtURL:onProgress:onComplete:] in RCTJavaScriptLoader.o
+[RCTJavaScriptLoader attemptSynchronousLoadOfBundleAtURL:runtimeBCVersion:sourceLength:error:] in RCTJavaScriptLoader.o "facebook::react::IRemoteConnection::~IRemoteConnection()", referenced from:
RemoteConnection::~RemoteConnection() in RCTInspector.o "facebook::react::parseTypeFromHeader(facebook::react::BundleHeader const&)", referenced from:
+[RCTJavaScriptLoader attemptSynchronousLoadOfBundleAtURL:runtimeBCVersion:sourceLength:error:] in RCTJavaScriptLoader.o
"facebook::react::customJSCWrapper()", referenced from:
-[RCTDevSettings isJSCSamplingProfilerAvailable] in RCTDevSettings.o
-[RCTDevSettings toggleJSCSamplingProfiler] in RCTDevSettings.o ____ZL11getInstancev_block_invoke in RCTInspector.o
_RCTNSErrorFromJSErrorRef in RCTJSCErrorHandling.o
-[RCTSamplingProfilerPackagerMethod handleRequest:withResponder:] in RCTSamplingProfilerPackagerMethod.o
"facebook::react::systemJSCWrapper()", referenced from:
-[RCTDevSettings isJSCSamplingProfilerAvailable] in RCTDevSettings.o
-[RCTDevSettings toggleJSCSamplingProfiler] in RCTDevSettings.o
_RCTNSErrorFromJSErrorRef in RCTJSCErrorHandling.o
-[RCTSamplingProfilerPackagerMethod handleRequest:withResponder:] in RCTSamplingProfilerPackagerMethod.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld /Users/antoine/R/devlab/ReactNative/medway-twilio/MedwayTwilio/ios/build/Build/Products/Debug-iphonesimulator/React/React.framework/React normal x86_64 (1 failure)
我懷疑這是關係到包括庫和框架與Xcode中的項目,但我不知道。
這是我的項目目標的截圖/建造階段/鏈接二進制與圖書館面板在Xcode:
其中「MedwayTwilio」是我的項目名稱
您能否告訴我更多的信息,例如在您的iOS項目中的庫的一部分 –
您是否嘗試運行react-native鏈接? –
@JulienKode我添加了一個截圖,如果這是你所要求的。 react-native鏈接告訴我我的庫已經鏈接 –