错误&quot“为ARM MACOS设置可可录,运行:ARCH -X86_64 SUDO GEM install FFI无法解决错误;

发布于 2025-02-10 22:40:33 字数 988 浏览 1 评论 0原文

在M1 MAC上的Android Studio中的可可PODS错误。需要帮助解决此错误。我已经在线尝试了其他方法,但没有任何帮助。我什至重新安装了自制的,但没有帮助。

[✓] Flutter (Channel stable, 3.0.3, on macOS 12.2.1 21D62 darwin-arm (Rosetta),
    locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

• No issues found!

Error: To set up CocoaPods for ARM macOS, run:
  arch -x86_64 sudo gem install ffi

Error running pod install
Error launching application on iPhone 13.

dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/ffi_c.bundle' (no such file) - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle (LoadError)

Cocoa pods error in Android Studio on M1 Mac in Flutter. Need help fixing this error. I have tried other methods online but none have helped. I have even re-installed with HomeBrew, but no help.

[✓] Flutter (Channel stable, 3.0.3, on macOS 12.2.1 21D62 darwin-arm (Rosetta),
    locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

• No issues found!

Error: To set up CocoaPods for ARM macOS, run:
  arch -x86_64 sudo gem install ffi

Error running pod install
Error launching application on iPhone 13.

dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/ffi_c.bundle' (no such file) - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi_c.bundle (LoadError)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

睫毛溺水了 2025-02-17 22:40:33

在终端中运行此命令

Arch -x86_64 sudo Gem install ffi

然后在项目的iOS文件夹中运行此命令

ARCH -X86_64 POD pod install

Run this commands in terminal

arch -x86_64 sudo gem install ffi

Then inside the ios folder of your project run this command

arch -x86_64 pod install

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文