M1芯片Xcode抛出错误提示pod building for iOS Simulator-x86_64 but attempting to link with file built for i...

pod building for iOS Simulator-x86_64 but attempting to link with file built for iOS Simulator-arm64

Undefined symbols for architecture x86_64:  "_OBJC_CLASS_$_JJJJContainerViewController", referenced from:       objc-class-ref in EXJJViewController.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

错误信息如上图所示,尝试方法如下:

1.验证是否使用Rosetta开启Xcode,方法  Xcode右键-》显示简介-》使用Rosetta打开,已开启。

2. target确认是否配置arm64

target配置项目

3. 删除本地Xcode 14.3 所有的配置,重新安装Xcode14.2 ,重启电脑,清空所有的Xcode缓存,均无效。

4. 重新安装Xcode14.2,查看rosetta配置。

5. 查看Xcode的编码信息。

查看Xcode包信息  路径如下:/Applications/Xcode.app/Contents/MacOS

终端输入: 

 cd /Applications/Xcode.app/Contents/MacOS

输出结果为:

Architectures in the fat file: Xcode are: x86_64 arm64

6. 各种清空配置,均无果。

N天后无意中尝试修改pod的配置成功!!!


新的配置
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容