解决 “invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)”

简介: http://stackoverflow.com/questions/19520683/how-can-i-address-errors-in-my-ios-project-which-i-hope-to-submit-to-app-store ProcessPCH /Us...

http://stackoverflow.com/questions/19520683/how-can-i-address-errors-in-my-ios-project-which-i-hope-to-submit-to-app-store
 
ProcessPCH /Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/PrecompiledHeaders/Steampunk\ Clock-Prefix-gxthjnzoqzlexccyjihvntdifuwt/Steampunk\ Clock-Prefix.pch.pch Steampunk\ Clock/Steampunk\ Clock-Prefix.pch normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd "/Users/jonathan/Desktop/Steampunk Clock"
    setenv LANG en_US.US-ASCII
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c-header -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/jonathan/Library/Developer/Xcode/DerivedData/ModuleCache -Wno-trigraphs -fpascal-strings -Os -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-receiver-is-weak -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -miphoneos-version-min=5.0 -iquote /Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/IntermediateBuildFilesPath/Steampunk\ Clock.build/Release-iphoneos/Steampunk\ Clock.build/Ancient\ Steampunk\ Clock-generated-files.hmap -I/Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/IntermediateBuildFilesPath/Steampunk\ Clock.build/Release-iphoneos/Steampunk\ Clock.build/Ancient\ Steampunk\ Clock-own-target-headers.hmap -I/Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/IntermediateBuildFilesPath/Steampunk\ Clock.build/Release-iphoneos/Steampunk\ Clock.build/Ancient\ Steampunk\ Clock-all-target-headers.hmap -iquote /Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/IntermediateBuildFilesPath/Steampunk\ Clock.build/Release-iphoneos/Steampunk\ Clock.build/Ancient\ Steampunk\ Clock-project-headers.hmap -I/Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/BuildProductsPath/Release-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/IntermediateBuildFilesPath/Steampunk\ Clock.build/Release-iphoneos/Steampunk\ Clock.build/DerivedSources/arm64 -I/Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/IntermediateBuildFilesPath/Steampunk\ Clock.build/Release-iphoneos/Steampunk\ Clock.build/DerivedSources -F/Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/BuildProductsPath/Release-iphoneos --serialize-diagnostics /Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/PrecompiledHeaders/Steampunk\ Clock-Prefix-gxthjnzoqzlexccyjihvntdifuwt/Steampunk\ Clock-Prefix.pch.dia -MMD -MT dependencies -MF /Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/PrecompiledHeaders/Steampunk\ Clock-Prefix-gxthjnzoqzlexccyjihvntdifuwt/Steampunk\ Clock-Prefix.pch.d -c /Users/jonathan/Desktop/Steampunk\ Clock/Steampunk\ Clock/Steampunk\ Clock-Prefix.pch -o /Users/jonathan/Library/Developer/Xcode/DerivedData/Steampunk_Clock-cblavmmgjxgqzpfwzbpirbdjpspm/Build/Intermediates/ArchiveIntermediates/Steampunk\ Clock/PrecompiledHeaders/Steampunk\ Clock-Prefix-gxthjnzoqzlexccyjihvntdifuwt/Steampunk\ Clock-Prefix.pch.pch

error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)
error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)
1 error generated.
/Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:7:9: fatal error: could not build module 'Darwin'
#import 
 ~~~~~~~^
error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)
While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14:
In file included from :1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8:9: fatal error: could not build module 'Darwin'
#import 
 ~~~~~~~^
error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)
error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)
While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14:
While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8:
While building module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In file included from :1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11:10: fatal error: could not build module 'Darwin'
#include 
 ~~~~~~~~^
2 errors generated.
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: fatal error: could not build module 'CoreFoundation'
#include 
 ~~~~~~~~^
error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)
While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14:
While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8:
While building module 'ObjectiveC' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:6:
In file included from :1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/objc/message.h:28:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/usr/include/objc/objc.h:31:10: fatal error: could not build module 'Darwin'
#include       // for __DARWIN_NULL
 ~~~~~~~~^
2 errors generated.
error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)
While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14:
While building module 'Foundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccelerometer.h:8:
While building module 'Security' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLCredential.h:9:
In file included from :1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Security.framework/Headers/Security.h:24:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:32:10: fatal error: could not build module 'Darwin'
#include 
 ~~~~~~~~^
2 errors generated.
8 errors generated.
error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)
While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14:
While building module 'CoreGraphics' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibility.h:8:
In file included from :1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:159:11: fatal error: could not build module 'Darwin'
# include 
  ~~~~~~~~^
2 errors generated.
error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)
While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14:
While building module 'CoreImage' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIColor.h:10:
In file included from :1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CoreImage.h:8:9: fatal error: could not build module 'Foundation'
#import 
 ~~~~~~~^
error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CoreVideo.h:16:10: fatal error: could not build module 'Darwin'
#include 
 ~~~~~~~~^
2 errors generated.
4 errors generated.
error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)
While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14:
While building module 'CoreText' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/NSText.h:9:
In file included from :1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h:20:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreText.framework/Headers/CTDefines.h:29:11: fatal error: could not build module 'Darwin'
# include 
  ~~~~~~~~^
2 errors generated.
error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)
While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
In file included from :1:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h:6:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h:13:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.0/include/stdint.h:33:16: fatal error: could not build module 'Darwin'
# include_next 
  ~~~~~~~~~~~~~^
error: invalid deployment target '5.0.0' for architecture 'arm64' (requires '7.0.0' or later)
While building module 'UIKit' imported from /Users/jonathan/Desktop/Steampunk Clock/Steampunk Clock/Steampunk Clock-Prefix.pch:14:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
While building module 'OpenGLES' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:7:
In file included from :1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:8:10: fatal error: could not build module 'Foundation'
#include 
 ~~~~~~~~^
2 errors generated.
4 errors generated.
22 errors generated.
25 errors generated.




The answer can be found by a close reading of the error. It appears to indicate that arm64 is not supported for your app which is targeting 5.0.0. If this answer satisfy's your use-case please don't forget to accept the answer so that other users will locate the solution.

High-level concepts

Arm64 was just introduced to support iOS7 so it did not exist on iOS5 devices. Something to keep in mind is that iOS5 devices will not support any of the iOS7 specific features.

Low-level detail

Specific to the error you are seeing:

Note the definition of the Valid Architecture settings:

A space-separated list of architectures for which the target should actually be built. For each target, this list is intersected with the list specified in 'Architectures', and the resulting set is built. This allows individual targets to “opt out” of building for particular architectures. If the resulting set of architectures is empty, no executable will be produced. [VALID_ARCHS]

You can change the architecture of the device you are targeting by removing the arm64 text from your debug/release code. The effect of this is that your app will run in 32 bit mode only on 5s devices. Your current error should disappear when you remove the arm64 setting.

Select your Project > Click on Build Settings > Valid Architectures

Search for 'arch' (no quotes) > Search Term

Double-click into the White Space (Under the Target and Project Column) > Select arm64 > Hit the Minus button on the bottom of the popup box

Popup Menu


目录
相关文章
|
Android开发
invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe 错误
引用:http://blog.csdn.net/eyetee/article/details/6610820 eclipse->window->preferences->android-> SDK Location中的 "C:\Program Files\Android\android-sdk...
732 0
|
1月前
|
数据处理 编译器 数据库
x64 和 arm64 处理器架构的区别
x64 和 arm64 处理器架构的区别
78 0
【各种问题处理】X86架构和ARM架构的区别
【1月更文挑战第13天】【各种问题处理】X86架构和ARM架构的区别
|
5月前
|
Web App开发 NoSQL 安全
ARM架构-银河麒麟v10-server离线安装Harbor
ARM架构-银河麒麟v10-server离线安装Harbor
350 0
|
5月前
|
边缘计算 编译器 数据中心
X86架构与Arm架构的主要区别分析
X86架构与Arm架构的主要区别分析
494 0
|
4月前
|
缓存 API Android开发
一起学点ARM的微架构二?
一起学点ARM的微架构二?
85 1
|
7月前
|
存储 缓存 监控
安谋科技(Arm China)马闯:Arm架构下性能分析与优化介绍
2023年9月19日,系列课程第九节《Arm®架构下性能分析与优化介绍》正式上线,由安谋科技 (Arm China)主任工程师马闯主讲,内容涵盖:Arm架构下性能监控单元 (PMU) 介绍、Arm统计性能分析扩展 (SPE) 介绍、Arm性能分析工具介绍、Arm架构下性能优化案例分享,本期节目在阿里云官网、阿里云微信视频号、阿里云钉钉视频号、InfoQ官网、阿里云开发者微信视频号、阿里云创新中心直播平台 & 微信视频号同步播出,同时可以点击【https://developer.aliyun.com/topic/ecs-yitian】进入【倚天实例迁移课程官网】了解更多内容。
|
22天前
|
敏捷开发 数据可视化 物联网
云效产品使用常见问题之用ARM架构的机器意义不知道如何解决
云效作为一款全面覆盖研发全生命周期管理的云端效能平台,致力于帮助企业实现高效协同、敏捷研发和持续交付。本合集收集整理了用户在使用云效过程中遇到的常见问题,问题涉及项目创建与管理、需求规划与迭代、代码托管与版本控制、自动化测试、持续集成与发布等方面。
|
2月前
|
物联网 编译器 测试技术
【嵌入式 交叉编译器】如何在 ARM 架构下选择和使用高版本交叉编译器
【嵌入式 交叉编译器】如何在 ARM 架构下选择和使用高版本交叉编译器
267 7
|
2月前
|
存储 机器学习/深度学习 并行计算
阿里云服务器X86计算、Arm计算、GPU/FPGA/ASIC、高性能计算架构区别
在我们选购阿里云服务器的时候,云服务器架构有X86计算、ARM计算、GPU/FPGA/ASIC、弹性裸金属服务器、高性能计算可选,有的用户并不清楚他们之间有何区别,本文主要简单介绍下不同类型的云服务器有何不同,主要特点及适用场景有哪些。
阿里云服务器X86计算、Arm计算、GPU/FPGA/ASIC、高性能计算架构区别