首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Flutter IOS Cocoapods‘Cocoapods的错误输出:’

Flutter IOS Cocoapods‘Cocoapods的错误输出:’
EN

Stack Overflow用户
提问于 2021-09-04 21:22:16
回答 1查看 1.3K关注 0票数 3

我在模拟器上运行我的iOS应用程序没有问题。在我尝试实现facebook登录后,我的Flutter项目开始需要安装Cocoapods。

在安装Cocoapod之后,我尝试在iOS模拟器上使用flutter run,但是我得到了这个错误:

代码语言:javascript
复制
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install...                                           2.043ms
CocoaPods' output:
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using ARCHS setting to build architectures of target Pods-Runner: (``)

    Fetching external sources
    -> Fetching podspec for Flutter from Flutter
    -> Fetching podspec for flutter_facebook_auth from .symlinks/plugins/flutter_facebook_auth/ios

    Resolving dependencies of Podfile

Error output from CocoaPods:
↳
    /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require':
    dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle, 9): no suitable image found.  Did find: (LoadError)
        /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle: mach-o, but wrong architecture
        /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle: mach-o, but wrong architecture -... etc

为什么我在没有安装Cocoapods的情况下可以正常运行,而今天却必须在我的Emulator上运行?现在我得到了所有这些错误!

PS:我的Podfile已经配置了plataform: ios, '9.0',并且我在ios中没有开发人员帐户。

EN

回答 1

Stack Overflow用户

发布于 2021-09-04 21:38:21

我找到了解决方案。

在项目路径上,打开终端并运行gem install ffi

在Podfile目录下,在终端上运行arch -x86_64 pod installpod install

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69059030

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档