没有架构可供编译 (ONLY_ACTIVE_ARCH=YES, active arch=armv7, VALID_ARCHS=armv6 i386)。

11

在构建我的iOS应用程序时,我遇到了这个错误。

没有架构可供编译(ONLY_ACTIVE_ARCH=YES,active arch=armv7,VALID_ARCHS=armv6 i386)。

当我尝试使用_ACAccountTypeIdentifierTwitter时,我遵循以下错误:

未定义的符号体系结构armv7s:

"_ACAccountTypeIdentifierTwitter", referenced from:
  -[ClsHomePageViewController twitterLogin:] in ClsHomePageViewController.o
"_OBJC_CLASS_$_ACAccountStore", referenced from:
  objc-class-ref in ClsHomePageViewController.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我的架构设置如下:

architectures: Standard Architectures (including 64-bit) (armv7,armv7s,armv64)
Base SDK: Latest iOS (iOS 7.0)
Build Active Architecture Only: NO
Valid Architectures: arm64 armv7s armv7

3
从有效架构中移除armv6。清理并运行。 - Sunny Shah
欢迎来到StackOverflow。请搜索描述相同问题的旧问题。您的问题是https://dev59.com/L2cs5IYBdhLWcg3wYzH6,https://dev59.com/EnjZa4cB1Zd3GeqPZhOb,https://dev59.com/B33aa4cB1Zd3GeqPXgcL等的重复。 - Codo
3个回答

23

前往你的项目,在Project(而不是target)中打开Build Settings,并将 Build Active Architecture Only 设置为 NO

更改仅活动架构


非常感谢您的回复。请检查我的问题,我编辑了问题并尝试详细解释了我的问题。 - Kaushal Soni
非常感谢,这节省了我的时间。 - Uthen
为什么不调试?这会影响我们的调试能力吗? - obliviousfella

3

1. 请检查您的项目架构。您可以按照以下步骤找到架构:

从目标 - 构建设置 - 架构中查看,如下截图所示:enter image description here

2. 仅在调试时设置“Build Active Architecture Only”为“YES”。

参考:iOS当前具有以下指令集:

(1). armv6,支持机型:iPhone,iPhone2,iPhone3G和相应的iTouch

(2). armv7,支持机型:iPhone4,iPhone4S

(3). armv7s,支持机型:iPhone5,iPhone5C

(4). arm64,支持机型:iPhone5S


非常感谢您的回复。请检查我的问题,我编辑了问题并尝试详细解释了我的问题。 - Kaushal Soni

2
您可以在有效架构列表中添加armv7

非常感谢您的回复。请检查我的问题,我编辑了问题并尝试详细解释了我的问题。 - Kaushal Soni

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接