ara*_*ind 21 xcode ios dart visual-studio-code flutter
我在通过 M1 Macbook pro 在 IOS 模拟器中构建 flutter 应用程序时遇到以下错误。我正在使用 VS 代码进行编辑。\n在使用连接到 Mac 的 iPhone 进行构建时,我的构建没有出现任何问题。\n知道如何解决此问题。
\n\nLaunching lib/main.dart on IPhone 13 Simulator in debug mode...\nlib/main.dart:1\nXcode build done. 1.5s\nFailed to build iOS app\nError output from Xcode build:\n\xe2\x86\xb3\n 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.\n 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.\n ** BUILD FAILED **\nXcode\'s output:\n\xe2\x86\xb3\n note: Using new build system\n note: Planning\n note: Build preparation complete\n note: Building targets in dependency order\n /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\')\nCould not build the application for the simulator.\nError launching application on IPhone 13 Simulator.\nExited (sigterm)\nRun Code Online (Sandbox Code Playgroud)\n我添加下面的 x 代码配置:
\n\nVla*_*nin 16
我在我的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
end
Run Code Online (Sandbox Code Playgroud)
cd ios/ && arch -x86_64 pod install。
使用 Rosetta 运行 Xcode。
。
您可以通过运行以下命令来安装 Rosetta:softwareupdate --install-rosetta
干净的构建 - 打开 xcode 然后按 Command + Shift + K
| 归档时间: |
|
| 查看次数: |
22613 次 |
| 最近记录: |