当我通过M1 Macbook pro在IOS模拟器中构建我的颤振应用程序时,我得到了下面的错误。我使用VS代码进行编辑。当我的iPhone连接到mac的时候,我对大楼没有任何问题。知道怎么解决这个问题吗。

Launching lib/main.dart on IPhone 13 Simulator in debug mode...
lib/main.dart:1
Xcode build done. 1.5s
Failed to build iOS app
Error output from Xcode build:
↳
objc[10488]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x1ffeb6b90) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1048c42c8). One of the two will be used. Which one is undefined.
objc[10488]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x1ffeb6be0) and /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1048c4318). One of the two will be used. Which one is undefined.
** BUILD FAILED **
Xcode's output:
↳
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/aravindganesh/Documents/Development/myproject/ios/Runner.xcodeproj: error: The linked framework 'Pods_Runner.framework' is missing one or more architectures required by this target: x86_64. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on IPhone 13 Simulator.
Exited (sigterm)我在下面添加x代码配置:

发布于 2022-04-04 17:12:38
我在我的M1 Mac上也有同样的问题,下面是我为解决这个问题所做的工作:
sudo arch -x86_64 gem install ffipost_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
end
end
endcd ios/ && arch -x86_64 pod install。
。
您可以通过运行:softwareupdate --install-rosetta安装Rosetta

nvm,请尝试用which node命令的实际结果替换NODE_BINARY=node,在我的示例中,这个结果如下所示:

发布于 2022-03-26 13:29:46
一个简单的flutter clean为我解决了这个问题。
发布于 2022-06-24 22:52:22
Xcode 13.4
目标>构建设置>生成选项>允许多平台构建:是的

https://stackoverflow.com/questions/70447462
复制相似问题