扑来:网络_info_plus在m1 max上损坏

发布于 2025-01-20 09:37:54 字数 1207 浏览 2 评论 0原文

已经在 github 上的公开包中发布了一个错误,但这是正在发生的事情。

  • 在 M1 Max Mac 上创建全新的 flutter 应用程序。
  • 在 pubspec.yaml 中添加 network_info_plus 依赖项。
  • 打开 iPhone 13 Pro 的 iOS 模拟器。
  • 在 Android studio 中运行应用程序。
  • 观察错误:
/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, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')) - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle (LoadError)

Pubspec.yaml相关包:

dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.4
  shared_preferences: ^2.0.13
  sembast: ^3.2.0
  path_provider: ^2.0.9
  network_info_plus: ^2.1.3

包参考链接: https://pub.dev/packages/network_info_plus

Already posted a bug at the publicly held package on github, but here's what's going on.

  • Create a brand new flutter application on an M1 Max Mac.
  • Add the network_info_plus dependency in your pubspec.yaml.
  • Open up the iOS simulator for iPhone 13 Pro.
  • Run the application in Android studio.
  • Observe the error:
/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, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')) - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle (LoadError)

Pubspec.yaml relevant packages:

dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.4
  shared_preferences: ^2.0.13
  sembast: ^3.2.0
  path_provider: ^2.0.9
  network_info_plus: ^2.1.3

Package reference link:
https://pub.dev/packages/network_info_plus

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

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

发布评论

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

评论(1

岁月静好 2025-01-27 09:37:54

事实证明这是一个环境问题。我在Mac上与Ruby乱七八糟,我认为这可能已经杀死了iOS的建筑物。最终修复的是运行GEM安装Cocoapods,而我的构建神奇地开始工作。

我还删除了我的pubspec.lock,并重载了我的资产。我跑了颤抖的清洁。在上面并擦拭我的PubSpec.lock和重新下载我的软件包之间,其中一个似乎可以修复它。

This turned out to be an environment issue. I was messing around with ruby on my mac and I think that might have killed my builds to iOS. What ended up fixing it was running gem install cocoapods and my builds magically started working.

I also deleted my pubspec.lock as well and redownloaded my assets. I ran flutter clean. Between the above and wiping my pubspec.lock and redownloading my packages, one of those seemed to fix it.

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