最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】Xcode编译警告:Target of project Pods was rejected as an implicit dependency for because its architectures x86_64 didn’t contain all required architectures i386 x86_64

Xcode crifan 6934浏览 0评论

【背景】

折腾:

[基本解决]使用iOS模拟器iPhone 6结果编译出错:file was built for i386 which is not the architecture being linked x86_64

去把:

Build Settings-》Build Active Architecture Only-》Debug的Yes改为No

结果编译出现警告了:

Target ‘Pods-QorosSales’ of project ‘Pods’ was rejected as an implicit dependency for ‘Pods_QorosSales.framework’ because its architectures ‘x86_64’ didn’t contain all required architectures ‘i386 x86_64’

  如图:

Target of project Pods was rejected as an implicit dependency for because its architectures x86_64

 

【解决过程】

1.

参考:

cocoa – Xcode 6.1: file was built for x86_64 which is not the architecture being linked (i386) – Stack Overflow

去给

Architectures中添加i386和x86_64

add x86_64 and i386 for architectures of xcode

 

搜:

Charts, file was built for i386 which is not the architecture being linked (x86_64)

参考:

iphone – file was built for archive which is not the architecture being linked (i386) – Stack Overflow

 

add x86_64 and i386 for valid architectures

 

结果错误依旧。

ios – file was built for arm64 which is not the architecture being linked (x86_64) – Stack Overflow

ios – Error: "File was built for archive which is not the architecture being linked (armv7s)" – Stack Overflow

 

去看看pods中的配置

pods targets build settings architectures

 

然后去改试试

iphone – file was built for archive which is not the architecture being linked (i386) – Stack Overflow

  • i386 = ios simulator or 32 bit build on mac os x
  • armv6 armv7 arm7s = ios device
  • x86_64 = 64 bit build on mac os x

 

搜:

Target ‘Pods-QorosSales’ of project ‘Pods’ was rejected as an implicit dependency for ‘Pods_QorosSales.framework’ because its architectures ‘x86_64’ didn’t contain all required architectures ‘i386 x86_64 x86_64 i386’

 

Target of project ‘Pods’ was rejected as an implicit dependency for  framework because its architectures

 

Pods was rejected as an implicit dependency for ‘libPods.a’ because its architectures ” didn’t contain all required architectures ‘i386’ · Issue #2053 · CocoaPods/CocoaPods

 

去:

删除Pods文件夹

和podfile.lock

 

重新去pod install:

 

licrifandeMacBook-Pro:QorosSales crifan$ pod install
Analyzing dependencies
Downloading dependencies
Installing Charts (2.2.4)
Installing KKGestureLockView (1.0.0)
Installing SEFilterControl (2.0.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 3 total pods installed.

结果问题依旧。

 

再去删除builds文件夹,结果问题依旧。

 

后来,是通过还原之前的设置,即:

Build Settings-》Build Active Architecture Only-》Debug,保留之前的设置:Yes

 

然后通过删除DerivedData中残留的Charts库而解决了问题:

[基本解决]使用iOS模拟器iPhone 6结果编译出错:file was built for i386 which is not the architecture being linked x86_64

转载请注明:在路上 » 【已解决】Xcode编译警告:Target of project Pods was rejected as an implicit dependency for because its architectures x86_64 didn’t contain all required architectures i386 x86_64

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.202 seconds, using 22.10MB memory