繁体   English   中英

Xcode 12.5,为 iOS-armv7 构建但试图链接为 iOS-arm64 问题构建的文件

[英]Xcode 12.5, building for iOS-armv7 but attempting to link with file built for iOS-arm64 problem

我正在尝试在 Xcode 12.5 上构建一个 IOS 项目。 连接真实设备或尝试使用模拟器构建时没有问题。 But I get this error when Any IOS Device is selected. 选择任何 IOS 设备来存档我的项目,我在存档时收到一条错误消息。 我已经改变了'Build Active Arch。 Only' 和 'Excluded Architecture' 设置了很多次,但问题一直没有解决。

错误图像

请帮我解决这个问题..

当我将其更改为 IOS 部署目标 12.0 时问题解决了

  • Build Active Architecture Only 选为是。

看这个截图—— 在此处输入图像描述

问题是Undefined symbols for architecture armv7

你能去你的Build Settings

  1. 项目
  2. 应用目标
  3. 如果您使用 pod,则所有 pod 目标

搜索armv7并删除它(如果存在)?

在此之后,执行Product > Clean Build Folder & 现在尝试运行/构建应用程序。

我在我的项目中遇到了同样的错误。 我使用Xcode 13.3.1 所以我用下一种方式更新了我的Podfile (添加了排除的拱门和部署目标):

$iOSVersion = '13.1'
platform :ios, $iOSVersion
use_frameworks!

def general_pods
  pod 'Some_pods_here'
end

target 'Some_target1' do
  general_pods
  pod 'Some_pod_here'
end

target 'Some_target2' do
  general_pods
  pod 'some_pod_here'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
      config.build_settings["EXCLUDED_ARCHS[sdk=*]"] = "armv7"
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
    end
  end

installer.pods_project.targets.each do |target|
  target.build_configurations.each do |config|
    if Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
    end
   end
 end
end

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM