我在真实的 iOS 设备上构建了我的项目,它工作正常,但是当我尝试在模拟器上运行它时,它给了我以下架构错误。另外,我之前也遇到过同样的问题,当时应用程序在模拟器上运行良好,但在真实设备上却出现了同样的错误。
Non-fat binary /Users/dhavalkansara/Library/Developer/Xcode/DerivedData/Runner-dwtuugielmxutoatpwezjbbcemuy/Build/Products/Debug-iphonesimulator/Runner.app/Frameworks/App.framework/App is not x86_64. Running lipo -info:
Non-fat file: /Users/dhavalkansara/Library/Developer/Xcode/DerivedData/Runner-dwtuugielmxutoatpwezjbbcemuy/Build/Products/Debug-iphonesimulator/Runner.app/Frameworks/App.framework/App is architecture: arm64
Command /bin/sh failed with exit code 1
我尝试了多种可用的解决方案 #25260 , #22749 , #23917在 GitHub 上,但仍然面临同样的问题。
最佳答案
您的项目可能有一个运行脚本构建阶段,用于删除模拟器架构(以避免 AppStore 拒绝)。
此脚本通常是此脚本的变体:http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/
如果项目构建运行这样的脚本,当目标是模拟器而不是真实设备时,构建可能会失败。
我的建议:找到此脚本(在“目标设置”->“构建阶段”中)并将其包含在:
if [[ "$CONFIGURATION" == "Release" ]]; then
[Put original script here]
fi
关于ios - Flutter:应用程序不是 x86_64。运行 lipo -info:,应用程序架构:arm64,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59613498/