【问题标题】:Main_iPhone.storyboard: Compilation failed. Unable to write to path:Main_iPhone.storyboard:编译失败。无法写入路径:
【发布时间】:2014-09-30 02:09:50
【问题描述】:

这是整个日志

/Users/myname/reponame/projectname/projectname/Base.lproj/Main_iPhone.storyboard: 
Compilation failed. Unable to write to path: /Users/myname/Library/Developer/Xcode/
DerivedData/projectname-csxwagvbpfvfsmbgswcukqirbmgg/Build/Products/Debug-iphoneos/
projectname.app/Base.lproj/Main_iPhone.storyboardc


Underlying Errors:
        Description: The file “Main_iPhone.storyboardc” couldn’t be saved in the folder “Base.lproj” because a file with the same name already exists.
        Failure Reason: A file with the name “Main_iPhone.storyboardc” already exists.
        Recovery Suggestion: To save the file, either provide a different name, or move aside or delete the existing file, and try again.
        Underlying Errors:
            Description: The operation couldn’t be completed. File exists
            Failure Reason: File exists
        Description: “Main_iPhone.storyboardc” couldn’t be removed because you don’t have permission to access it.
        Failure Reason: You don’t have permission.
        Recovery Suggestion: To view or change permissions, select the item in the Finder and choose File > Get Info.
        Underlying Errors:
            Description: The operation couldn’t be completed. Directory not empty
            Failure

我害怕做一些我不理解的事情并最终进一步破坏我的代码。有谁知道如何解决这个问题?我应该提前删除方向吗?据我所知,这个问题是突然出现的。

【问题讨论】:

  • 查看类似问题的答案:link

标签: ios xcode storyboard interface-builder


【解决方案1】:

确保您的故事构建阶段->复制捆绑资源中出现多个 , 如果是,则删除一个即可解决问题。

【讨论】:

  • 是的!就我而言,此解决方案有所帮助。谢谢!
  • 这也解决了我的问题 - 也许它是由于 git 合并而发生的?
【解决方案2】:

我遇到了同样的问题。我的错误是我的情节提要 ID 之一包含一个“/”。在我删除它之后一切正常。希望对你有帮助。

【讨论】:

    【解决方案3】:

    post 中所述,清理我的项目对我有用。添加链接,以防人们找到此页面而不是其他页面。

    【讨论】:

      【解决方案4】:

      我今天遇到了同样的问题。只需删除 /Users/myname/Library/Developer/Xcode/ DerivedData/projectname-csxwagvbpfvfsmbgswcukqirbmgg/ 应该可以解决您的问题。您可能还需要退出 xcode 并重新启动它。

      【讨论】:

      • 我必须清理,然后退出 xcode,然后删除 DerivedData 文件夹并重新启动。退出并删除 DerivedData 还不够。
      • 感谢 Pat 和 Unplug。我在其中添加了一个故事板参考,然后添加了这个。所以,你的步骤解决了它。
      猜你喜欢
      • 1970-01-01
      • 2014-10-24
      • 2018-08-14
      • 2015-04-10
      • 2018-03-16
      • 2022-06-28
      • 2017-09-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多