Linker command failed with exit code 1 - duplicate

2020-02-08 06:50发布

Since I've updated to Xcode 8.1 I can't archive and also not run in Release mode (in debug mode its working). The error is that there are several "duplicate symbols for architecture arm64" and all are "duplicate symbol __TMRbBp". Whats that?

标签: xcode8.1
13条回答
乱世女痞
2楼-- · 2020-02-08 07:15

I had similar issues with Version 9.2 (9C40b), the solution is

0) Close Xcode
1) Open project folder in terminal
2) pod update
3) open .
4) open project by clicking Project.xcworkspace
查看更多
别忘想泡老子
3楼-- · 2020-02-08 07:15

For those that can't get the Thorax's answer to work, what I did was I closed out Xcode, ran pod update on my command line and then reopened the .xcworkspace file. After doing that, I was able to build and run the project.

I am using the Firebase Cocoapod and Xcode version 9.1.

查看更多
疯言疯语
4楼-- · 2020-02-08 07:16

Surprisingly, in some occasions, simply cleaning the product worked for me.

  • Product/Clean (Shift+Cmd+K)
  • Product/Clean Build Folder (Alt+Shift+Cmd+K)

Quick fix to try before looking at other solutions.

查看更多
唯我独甜
5楼-- · 2020-02-08 07:17

close you project then open xcode go to file -> open search your project and open it . this worked for me

查看更多
爷的心禁止访问
6楼-- · 2020-02-08 07:20

I faced the same problem with archiving on Xcode 8.1.

X Code Version: Version 8.2.1 (8C1002)

The following fix worked on Mar 2019

1) Go to Project & Select your Project

enter image description here

2) Select Build Settings -

Search for "Enable Bitcode" Set option as "NO"

enter image description here

3) Most of version will fix this issue, for few other XCode version try this option also,

Search for "Reflection Metadata Level" Set option as "NONE"

enter image description here

查看更多
来,给爷笑一个
7楼-- · 2020-02-08 07:25

It seems to be a bug in Swift. See discussion on Apple developers portal

It is said to be fixed in Xcode version that is about to be released. But for now there is temporary workaround:

Go to your target Build Settings and set Reflection Metadata Level flag to None

查看更多
登录 后发表回答