Flutter: App is not x86_64. Running lipo -info:, App is architecture: arm64

 ̄綄美尐妖づ 提交于 2020-01-12 11:55:29

问题


I built my project on a real iOS device and it was working fine but when I tried to run it on the simulator it gives me the below architecture error. Also, I have faced the same issue earlier and that time App was working fine for simulator and gave me the same error for the real device.

 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

I tried multiple solutions available #25260, #22749, #23917 on GitHub but still facing the same issue.


回答1:


Your project probably has a run-script build phase for removing simulator architecture (in order to avoid AppStore rejection).

This script is usually a variation of this one: http://ikennd.ac/blog/2015/02/stripping-unwanted-architectures-from-dynamic-libraries-in-xcode/

If the project build runs such a script, the build might fail when the destination is a simulator and not a real device.

My suggestion: Find this script (in Target Settings -> Build Phases) and enclose it in:

    if [[ "$CONFIGURATION" == "Release" ]]; then
    [Put original script here]
    fi


来源:https://stackoverflow.com/questions/59613498/flutter-app-is-not-x86-64-running-lipo-info-app-is-architecture-arm64

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!