Xcode 5 错误:无法创建目录 /projectname.build/Objects-normal/i386

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18930038/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:51:34  来源:igfitidea点击:

Xcode 5 error: Unable to create directory /projectname.build/Objects-normal/i386

iosxcode

提问by Charles Lin

After I updated to Xcode5, I have 3 Uncategorized errors every time I try to build.

更新到 Xcode5 后,每次尝试构建时都会出现 3 个未分类的错误。

Xcode tells me to Check dependencies

Xcode 告诉我检查依赖项

Unable to create directory /projectname.build

无法创建目录 /projectname.build

and a bunch of compiling error due to this:

以及由此产生的一堆编译错误:

error: couldn't create directory /projectname.build/Objects-normal/i386: Permission denied

错误:无法创建目录/projectname.build/Objects-normal/i386:权限被拒绝

Tried all the sudo lines I could find online but no help... Any can shine a light on this issue?

尝试了我可以在网上找到的所有 sudo 行,但没有帮助......任何人都可以解决这个问题吗?

采纳答案by bneely

It sounds like Xcode is trying to write to the root level of your hard drive, for which it doesn't have permissions. Don't change the permissions of your root folder because of this. Check your Locations preferences. Open Xcode preferences and check the path values in the Locations pref pane. Here are the paths I have:

听起来 Xcode 正在尝试写入您的硬盘驱动器的根级别,但它没有权限。因此,不要更改根文件夹的权限。检查您的位置偏好。打开 Xcode 首选项并检查 Locations 首选项窗格中的路径值。这是我拥有的路径:

  • Derived Data: /Users/xxx/Library/Developer/Xcode/DerivedData
  • Snapshots: /Users/xxx/Library/Developer/Xcode/Snapshots
  • Archives: /Users/xxx/Library/Developer/Xcode/Archives
  • 派生数据:/Users/xxx/Library/Developer/Xcode/DerivedData
  • 快照:/Users/xxx/Library/Developer/Xcode/Snapshots
  • 档案:/Users/xxx/Library/Developer/Xcode/Archives