相关疑难解决方法(0)

React Native ios - 架构 x86_64 的未定义符号

我已经构建了一个在 android 中运行良好的 React Native 应用程序......但是当我尝试在 ios 中构建时出现以下错误:Undefined symbols for architecture x86_64 它似乎以某种方式链接到 Flipper,详细错误如下:

     link with file built for iOS Simulator-arm64
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_FlipperKitNetworkPlugin", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_FlipperKitReactPlugin", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_SKDescriptorMapper", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_FlipperClient", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_RNCPushNotificationIOS", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_FlipperKitLayoutPlugin", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_RCTRootView", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_RCTBridge", referenced from:
      objc-class-ref in AppDelegate.o
  "_OBJC_CLASS_$_SKIOSNetworkAdapter", referenced from:
      objc-class-ref in …
Run Code Online (Sandbox Code Playgroud)

xcode objective-c clang react-native

20
推荐指数
1
解决办法
4万
查看次数

M1 (Apple Silicon) 上的 CocoaPods 因 ffi 错误的架构而失败

运行“POD安装”在M1的MacBook失败对我来说由于FFI问题,如所描述这里

我遵循了一些解决方法(我想我以各种顺序尝试了所有方法),但现在我得到了一个稍微不同的错误:

LoadError - dlopen(/opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.0/lib/ffi_c.bundle, 9): no suitable image found.  Did find:
    /opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.0/lib/ffi_c.bundle: mach-o, but wrong architecture
    /opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.0/lib/ffi_c.bundle: mach-o, but wrong architecture - /opt/homebrew/lib/ruby/gems/3.0.0/gems/ffi-1.15.0/lib/ffi_c.bundle
Run Code Online (Sandbox Code Playgroud)

所以,似乎我现在有 ffi,但架构错误?我怎样才能解决这个问题?在 Rosetta 模式下运行/不运行终端会发生这种情况。

顺便说一句,建议的解决方法之一对我来说没有成功。当我尝试:

sudo arch -x86_64 gem install ffi
Run Code Online (Sandbox Code Playgroud)

我得到:

arch: posix_spawnp: gem: Bad CPU type in executable
Run Code Online (Sandbox Code Playgroud)

不确定这是否相关。

ffi rosetta cocoapods apple-m1

10
推荐指数
8
解决办法
2947
查看次数

标签 统计

apple-m1 ×1

clang ×1

cocoapods ×1

ffi ×1

objective-c ×1

react-native ×1

rosetta ×1

xcode ×1