Flutter--missing compatible arch in ffi_c.bundle

2021-11-24 15:15:16 浏览数 (1)

背景

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

代码语言:javascript复制
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
代码语言:javascript复制
sudo arch -x86_64 gem install ffi
2. pod install安装依赖
代码语言:javascript复制
cd ./Macos
 pod install

参考资料

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

0 人点赞