xcode Main_iPhone.storyboard:编译失败。无法写入路径:
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25172271/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Main_iPhone.storyboard: Compilation failed. Unable to write to path:
提问by learner
Here is the entire log
这是整个日志
/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
I am afraid of doing something I don't understand and end up breaking my code further. Does anyone know how to fix this issue? Should I do ahead and delete the direction? To the best of my knowledge the problem arose out of the blue.
我害怕做一些我不理解的事情,最终会进一步破坏我的代码。有谁知道如何解决这个问题?我应该提前删除方向吗?据我所知,这个问题是突然出现的。
回答by Zeesha
Make sure that your storyboard notappears more than onein Build phases -> Copy bundle resources, If yes then remove one it will solve the issue.
请确保您的故事板不会出现一个以上的构建阶段- >复制捆绑资源,如果是,那么删除的话,会解决这一问题。
回答by Unplug
I ran into the same problem today. Simply deleting /Users/myname/Library/Developer/Xcode/ DerivedData/projectname-csxwagvbpfvfsmbgswcukqirbmgg/ should solve your problem. You may also need to exit xcode and restart it.
我今天遇到了同样的问题。只需删除 /Users/myname/Library/Developer/Xcode/ DerivedData/projectname-csxwagvbpfvfsmbgswcukqirbmgg/ 就可以解决您的问题。您可能还需要退出 xcode 并重新启动它。
回答by Jazzmine
回答by Void2g
I had the same problem. My mistake was that one of my storyboard ids included a "/". After I removed it everything worked fine. Hope it will help you.
我有同样的问题。我的错误是我的故事板 ID 之一包含“/”。我删除它后一切正常。希望它会帮助你。