美文网首页
React-Native 0.48.x Undefined sy

React-Native 0.48.x Undefined sy

作者: 萝卜丝巾 | 来源:发表于2017-11-06 16:00 被阅读90次

    RN升级到0.48.x时, xcode运行报错:
    Undefined symbols for architecture x86_64: "_JSNoBytecodeFileFormatVersion", referenced from: +[RCTJavaScriptLoader loadBundleAtURL:onProgress:onComplete:] in libReact.a(RCTJavaScriptLoader.o) +[RCTJavaScriptLoader attemptSynchronousLoadOfBundleAtURL:runtimeBCVersion:sourceLength:error:] in libReact.a(RCTJavaScriptLoader.o) "facebook::react::IRemoteConnection::~IRemoteConnection()", referenced from: RemoteConnection::~RemoteConnection() in libReact.a(RCTInspector.o) "facebook::react::systemJSCWrapper()", referenced from: -[RCTSamplingProfilerPackagerMethod handleRequest:withResponder:] in libReact.a(RCTSamplingProfilerPackagerMethod.o) -[RCTDevSettings isJSCSamplingProfilerAvailable] in libReact.a(RCTDevSettings.o) -[RCTDevSettings toggleJSCSamplingProfiler] in libReact.a(RCTDevSettings.o) "facebook::react::parseTypeFromHeader(facebook::react::BundleHeader const&)", referenced from: +[RCTJavaScriptLoader attemptSynchronousLoadOfBundleAtURL:runtimeBCVersion:sourceLength:error:] in libReact.a(RCTJavaScriptLoader.o) "facebook::react::customJSCWrapper()", referenced from: ____ZL11getInstancev_block_invoke in libReact.a(RCTInspector.o) -[RCTSamplingProfilerPackagerMethod handleRequest:withResponder:] in libReact.a(RCTSamplingProfilerPackagerMethod.o) -[RCTDevSettings isJSCSamplingProfilerAvailable] in libReact.a(RCTDevSettings.o) -[RCTDevSettings toggleJSCSamplingProfiler] in libReact.a(RCTDevSettings.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

    解决方法:
    在podfile文件中添加React库支持
    pod 'React', path: '../../node_modules/react-native', :subspecs => [
    ...,
    'BatchedBridge',
    ...
    ]
    完美解决问题...

    相关文章

      网友评论

          本文标题:React-Native 0.48.x Undefined sy

          本文链接:https://www.haomeiwen.com/subject/oaplmxtx.html