Flutter--missing compatible arch in ffi_c.bundle

背景

在运行Flutter Macos的时候,提示一下问题,没有找ffi_c.bundle在M1架构处理器下的文件。

LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle - /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:92:in `require'

解决方案

1.通过gem安装ffi
sudo arch -x86_64 gem install ffi
2. pod install安装依赖
cd ./Macos
 pod install

参考资料

https://github.com/CocoaPods/CocoaPods/issues/10220

你可能感兴趣的:(Flutter--missing compatible arch in ffi_c.bundle)