首页 > 解决方案 > IOS。可以添加 RN .a 库而不是安装 RN 环境吗?

问题描述

  1. 我用 RN 命令创建 AwesomeProject。
  2. 用 xcode 打开它并通过模拟器构建成功。
  3. 我在“Debug-iphonesimulator”文件夹下找到 RN .a 库。
  4. 创建一个新的 xcode 项目并添加第 3 步 .a 库。
  5. 建立成功。
  6. 在 AppDelegate 中复制 RCTRootView alloc initWithBundleURL 代码后,xcode 构建失败(选择了模拟器),出现 154 个常见错误:

架构 x86_64 的未定义符号:
“std::__1::system_error::system_error(int, std::__1::error_category const&, char const*)”,引用自:folly::throwSystemErrorExplicit(int, char const*) in libReact.a(JSBigString.o) "std::__1::basic_streambuf >::setbuf(char*, long)",引用自:vtable for google::base_logging::LogStreamBuf in libReact.a(logging.o) vtable对于 std::__1::basic_stringbuf, std::__1::allocator > in libReact.a(logging.o) vtable for std::__1::basic_stringbuf, std::__1::allocator > in libReact.a(JSCHelpers .o)

我想知道这种方法是否有效?
需要安装RN环境吗?

标签: iosreact-native

解决方案


推荐阅读