构建 flutter 项目时架构 x86_64 的未定义符号

Geo*_*lex 5 xcode build ios flutter apple-m1

我正在尝试从 Xcode 12.4 版为带有 iOS 14.4 的 iPhone 12 模拟器构建一个颤振项目。通过运行从命令行一切正常flutter run

在 Xcode 中,我遇到了以下错误代码。

ld: warning: ignoring file /Users/epsilon/Library/Developer/Xcode/DerivedData/Runner-fukggautraualohaflrpmsjaeyto/Build/Products/Debug-iphonesimulator/Reachability/Reachability.framework/Reachability, building for iOS Simulator-x86_64 but attempting to link with file built for iOS Simulator-arm64
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_Reachability", referenced from:
      objc-class-ref in FLTConnectivityPlugin.o
  "_kReachabilityChangedNotification", referenced from:
      -[FLTConnectivityPlugin onListenWithArguments:eventSink:] in FLTConnectivityPlugin.o
ld: symbol(s) not found for architecture x86_64
Run Code Online (Sandbox Code Playgroud)

我已经按照此处发布的解决方案进行操作:https : //stackoverflow.com/a/63955114/8640235以及同一帖子中的其他人,但没有成功。

后期编辑: 在此处输入图片说明

Moh*_*far 0

使用flutter create创建新项目并将代码迁移到新项目中。