Flutter--missing compatible arch
2021-09-18 本文已影响0人
None_Ling
背景
在运行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