刚刚更新为xcode 8.3.1并构建我的项目获取错误:
"__TFE7SnapKitPS_23ConstraintAttributesDSLg6heightCS_14ConstraintItem", referenced from:
"__TFE7SnapKitPS_23ConstraintAttributesDSLg5widthCS_14ConstraintItem", referenced from:
"__TFE7SnapKitPS_23ConstraintAttributesDSLg6centerCS_14ConstraintItem", referenced from:
"__TFE7SnapKitPS_23ConstraintAttributesDSLg7centerXCS_14ConstraintItem", referenced from:
"__TFE7SnapKitPS_23ConstraintAttributesDSLg6bottomCS_14ConstraintItem", referenced from:
"__TFE7SnapKitPS_23ConstraintAttributesDSLg7leadingCS_14ConstraintItem", referenced from:
"__TFE7SnapKitPS_23ConstraintAttributesDSLg7centerYCS_14ConstraintItem", referenced from:
"__TFE7SnapKitPS_23ConstraintAttributesDSLg8trailingCS_14ConstraintItem", referenced from:
"__TFE7SnapKitPS_23ConstraintAttributesDSLg3topCS_14ConstraintItem", referenced from:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
似乎是快速问题。
- 尝试
cmd + shift + k
- 删除
pod 'SnapKit'
pod install
并将其添加回仍然不起作用。
如果不是版本问题。如何调试/解决这些错误。谢谢。
编辑右键单击项目导航器中的错误,然后选择在日志中显示更多错误信息:
Undefined symbols for architecture x86_64:
"__TFE7SnapKitPS_23ConstraintAttributesDSLg6heightCS_14ConstraintItem", referenced from:
__TFFC6Auroma22AURAlarmViewController19configureBottomViewFCSo6UIViewT_U2_FC7SnapKit15ConstraintMakerT_ in AlarmViewController.o
我可以看到AlarmViewController
称为Snapkit布局方法。但是仍然不清楚为什么有错误。
编辑我以前的Xcode应该是8.3。
最终通过删除~/Library/Developer/Xcode/DerivedData
。