首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >链接框架“Pods_Runner.framework”缺少目标所需的一个或多个体系结构: x86_64

链接框架“Pods_Runner.framework”缺少目标所需的一个或多个体系结构: x86_64
EN

Stack Overflow用户
提问于 2021-12-22 10:18:21
回答 10查看 17.5K关注 0票数 21

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

代码语言:javascript
复制
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代码配置:

EN

回答 10

Stack Overflow用户

回答已采纳

发布于 2022-04-04 17:12:38

我在我的M1 Mac上也有同样的问题,下面是我为解决这个问题所做的工作:

  1. sudo arch -x86_64 gem install ffi
  2. 在ios文件夹中的pod文件末尾添加以下代码:
代码语言:javascript
复制
post_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
  1. cd ios/ && arch -x86_64 pod install
  2. 和罗塞塔一起运行Xcode。

您可以通过运行:softwareupdate --install-rosetta安装Rosetta

  1. 不包括体系结构arm64。
  1. 清理构建-打开xcode,然后按Command + Shift +K键
  2. 如果您正在使用nvm,请尝试用which node命令的实际结果替换NODE_BINARY=node,在我的示例中,这个结果如下所示:

对这些答案大喊:

票数 14
EN

Stack Overflow用户

发布于 2022-03-26 13:29:46

一个简单的flutter clean为我解决了这个问题。

票数 23
EN

Stack Overflow用户

发布于 2022-06-24 22:52:22

Xcode 13.4

目标>构建设置>生成选项>允许多平台构建:是的

票数 15
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70447462

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档