简体   繁体   English

链接器命令失败,退出代码为1-Xcode 7

[英]Linker command failed with exit code 1 - Xcode 7

I am trying to archive my app but every time I try I get an error: 我正在尝试存档我的应​​用,但是每次尝试都会出现错误:

ld: '/Users/Omer/Documents/FacebookSDK/FBSDKLoginKit.framework/FBSDKLoginKit(FBSDKLoginCompletion.o)' does not contain bitcode. 
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)    

My Enable Bitcode is set to YES but I still get this error. 我的启用位码设置为是,但仍然出现此错误。

What causes it and how can I fix it? 是什么原因导致的,我该如何解决?

UPDATE 更新

I have set Enable Bitcode to NO but now I get even more errors: 我已将“启用位码”设置为“否”,但现在出现了更多错误:

http://postimg.org/image/rqt1m35fx/ http://postimg.org/image/rqt1m35fx/

将其设置为“ NO因为错误提示说/Users/Omer/Documents/FacebookSDK/FBSDKLoginKit.framework/FBSDKLoginKit(FBSDKLoginCompletion.o)' does not contain bitcode.

it will occur in many scenario 它会在许多情况下发生

Choice -1 选择-1

Check that all your bundle resources are copied in build phase 检查所有捆绑资源在构建阶段是否已复制

Choice-2 选择2

It turned out that all related framework for Google are added or not 原来,是否添加了Google的所有相关框架

Choice-3 选择3

Check that all your bundle resources are copied in build phase 检查所有捆绑资源在构建阶段是否已复制

Choice-4 选择4

if you are using cocoapods make sure your target's build settings contain $(inherited) in the other linker flags section 如果您正在使用cocoapods确保目标的build settingsother linker flags部分中包含$(inherited)

Choice-5 选择5

You can get this type of error if your class' .m file is not listed under the "Compile Sources" step of the "Build Phases" tab of your target. 如果您的类的.m文件未在目标的“构建阶段”选项卡的“编译源”步骤下列出,则会出现这种类型的错误。 sometimes it loses the plot and you need to add the .m file manually. 有时会丢失绘图,您需要手动添加.m文件。

Preoject TargetSettings -> Build Phases -> Compile Sources -> add your .m class ->Build and Run 预注入TargetSettings->构建阶段->编译源->添加.m类-> Build and Run

Choice-6 选择6

Normally we add the library of the imported project in Target Dependency in Build Phases but we forget to add "compiled library" in Link Binary with Libraries in Build Phases 通常,我们在构建阶段的“目标相关性”中添加导入项目的库,但是在构建阶段我们忘记在“链接二进制文件”和“库”中添加“已编译的库”

I had the same problem. 我有同样的问题。 My answer is 1.Right-click on the error message-->reavel in log . 我的答案是1.右键单击错误消息->在日志中重新启动。 2.Look at the error message. 2.查看错误消息。 Find file name. 查找文件名。 3.Find file name in your project. 3.在您的项目中找到文件名。 4.After finding delete it Run again or archive again. 4.找到删除后,再次运行或再次存档。 That's my solution. 那是我的解决方案。 This is a headache question. 这是一个令人头疼的问题。 I hope to help you; 希望对您有所帮助;

Your options are to either: 您可以选择:

  1. Disable bit code for the project 禁用项目的位代码
  2. Update to the latest Facebook SDK which has bit code support 更新到具有位代码支持的最新Facebook SDK

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM