Main_iPhone.storyboard:编译失败。无法写入路径:

时间:2014-08-07 00:08:23

标签: ios xcode storyboard interface-builder

这是整个日志

/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

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

4 个答案:

答案 0 :(得分:15)

确保您的故事主板构建阶段 - >中显示多个复制捆绑资源,如果是,则删除一个将解决问题。

答案 1 :(得分:12)

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

答案 2 :(得分:2)

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

答案 3 :(得分:1)

我遇到了同样的问题。我的错误是我的一个故事板ID包含一个“/”。删除后,一切正常。希望它会对你有所帮助。