【问题标题】:Accidental deletion of a storyboard意外删除情节提要
【发布时间】:2015-01-26 15:03:51
【问题描述】:

伙计们,我真的需要别人的帮助。我是 iOS 开发的新手,但是一切都很顺利,直到我不小心删除了整个 Main.storyboard 文件而不是单个视图。我的垃圾箱中有这个文件,我试图把它放回去,但现在项目没有编译,而是抛出这个错误:

Ld /Users/Sergio/Library/Developer/Xcode/DerivedData/Test111-gnlasierruehmngkenyhntisfyrn/Build/Products/Debug-iphonesimulator/Test111.app/Test111 正常 i386 cd /Users/Sergio/Projects/Test111 导出 IPHONEOS_DEPLOYMENT_TARGET=7.1 导出 PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin: /usr/sbin:/sbin" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7。 1.sdk -L/Users/Sergio/Library/Developer/Xcode/DerivedData/Test111-gnlasierruehmngkenyhntisfyrn/Build/Products/Debug-iphonesimulator -F/Users/Sergio/Library/Developer/Xcode/DerivedData/Test111-gnlasierruehmngkenyhntisfyrn/Build/ Products/Debug-iphonesimulator -filelist /Users/Sergio/Library/Developer/Xcode/DerivedData/Test111-gnlasierruehmngkenyhntisfyrn/Build/Intermediates/Test111.build/Debug-iphonesimulator/Test111.build/Objects-normal/i386/Test111.LinkFileList - Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework CoreLocation -framework MapKit -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info - Xlinker /Users/Sergio/Library/Developer/Xcode/De rivedData/Test111-gnlasierruehmngkenyhntisfyrn/Build/Intermediates/Test111.build/Debug-iphonesimulator/Test111.build/Objects-normal/i386/Test111_dependency_info.dat -o /Users/Sergio/Library/Developer/Xcode/DerivedData/Test111-gnlasierruehmngkenyhntisfyrn/ Build/Products/Debug-iphonesimulator/Test111.app/Test111

重复符号_spacing: /Users/Sergio/Library/Developer/Xcode/DerivedData/Test111-gnlasierruehmngkenyhntisfyrn/Build/Intermediates/Test111.build/Debug-iphonesimulator/Test111.build/Objects-normal/i386/ChatViewController.o /Users/Sergio/Library/Developer/Xcode/DerivedData/Test111-gnlasierruehmngkenyhntisfyrn/Build/Intermediates/Test111.build/Debug-iphonesimulator/Test111.build/Objects-normal/i386/AllMessagesViewController.o ld:架构 i386 的 1 个重复符号 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

我该怎么做才能恢复一切?

【问题讨论】:

  • 从备份中恢复。
  • 没有,这就是问题

标签: ios xcode storyboard


【解决方案1】:

也许您可以尝试删除与您的项目相关的 DerivedData 文件夹。

打开终端,输入:

rm -Rf ~/Library/Developer/Xcode/DerivedData/Test111-gnlasierruehmngkenyhntisfyrn

之后,重建您的项目并重试。

【讨论】:

    【解决方案2】:

    好的,我自己解决了这个问题。从错误日志中可以看出,两个文件存在一些问题 - ChatViewController.m 和 AllMessagesViewController.m。当情节提要文件被删除时,“间距”变量出现了问题。所以我刚刚删除了其中一个有冲突的文件并重建了项目。

    学习阅读日志。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-01-26
      • 2011-12-07
      • 2015-04-20
      • 1970-01-01
      • 2012-02-13
      • 2011-01-23
      • 2013-06-17
      • 1970-01-01
      相关资源
      最近更新 更多