gpt4 book ai didi

ios 模拟器构建工作正常,但真实设备构建在 flutter 中失败

转载 作者:行者123 更新时间:2023-11-29 05:10:05 25 4
gpt4 key购买 nike

目前 flutter ios 构建面临一些问题。然后应用程序使用 flutter run 运行,对于 ios 模拟器 它可以工作,但如果连接了 真实设备,同样会失败。

下面是错误代码。

Non-fat binary /Users/x/demo/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/App is not arm64. Running lipo -info:
Non-fat file: /Users/x/demo/build/ios/Debug-iphoneos/Runner.app/Frameworks/App.framework/App is architecture: x86_64
Command /bin/sh failed with exit code 1

架构已添加,但仍然是这个问题。

enter image description here

此外,我确实尝试安装 pod 或更新它,但仍然没有任何好处。

编辑:附加 Flutter Doctor 图片。

enter image description here

最佳答案

该错误一定是由于签名功能造成的。尝试从 xcode 运行该项目。

按照以下步骤操作:

第一步:打开项目的ios文件夹,找到Runner.xcworkspace。它应该看起来像这样:

enter image description here

第 2 步:当 xcode 打开时,单击窗口左上角的 Runner。

enter image description here

第 3 步:转到“签名和功能”,然后在“团队”下拉列表下选择一个字段。如果不存在,请创建一个帐户。

enter image description here

第 4 步:在“ bundle 标识符”中,应显示您的应用程序的 bundle 名称。最后添加.app。例如,如果其“com.example.yourapp”,请将其设置为“com.example.yourapp.app”并按 Enter 键。

按左上角的播放按钮可在所选设备上运行应用程序。


如果不起作用,

在 xcode 中更改 flutter 目标运行器 - 仅构建事件架构:是

enter image description here

关于ios 模拟器构建工作正常,但真实设备构建在 flutter 中失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59774730/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com