扑来:网络_info_plus在m1 max上损坏
已经在 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
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明这是一个环境问题。我在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.