xcode Info.plist 文件“没有这样的文件”错误

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

Info.plist file "no such file" error

iphoneiosxcode

提问by Jamie

I have tried to move the files in my project folder to a different folder and everything went ok, except that Xcode cannot find my Info.plist file now. This is the error I get.

我试图将我的项目文件夹中的文件移动到另一个文件夹,一切正常,除了 Xcode 现在找不到我的 Info.plist 文件。这是我得到的错误。

could not read data from '/Users/jamiefraser/Developer/CocoaTouch Apps/MyApp/MyApp/MyApp/MyApp-Info.plist': The file “MyApp-Info.plist” couldn't be opened because there is no such file.

The actual files location is

实际文件位置是

'/Users/jamiefraser/Developer/CocoaTouch Apps/MyApp/MyApp/MyApp-Info.plist'

I have checked the build settings for the project and they read

我已经检查了项目的构建设置,他们阅读了

MyApp/MyApp-Info.plist

I have tried deleting the build folder and cleaning the project, but I always get this same error. I appreciate any help you can offer

我曾尝试删除构建文件夹并清理项目,但我总是遇到同样的错误。感谢您提供的任何帮助

采纳答案by sha

Remove MyApp/ portion from build settings. plist file usually is located in the same folder ad project. You can always open project file in vi and edit it manually.

从构建设置中删除 MyApp/ 部分。plist 文件通常位于同一文件夹中的广告项目。您始终可以在 vi 中打开项目文件并手动编辑它。

回答by Faizan S.

It is just a guess but it seems like one trailing /MyAppis too much in the location you are wanting to read from:

这只是一个猜测,但/MyApp在您要读取的位置似乎有太多的尾随:

'/Users/jamiefraser/Developer/CocoaTouch Apps/MyApp/MyApp/MyApp/MyApp-Info.plist'

As opposed to the actual location:

与实际位置相反:

'/Users/jamiefraser/Developer/CocoaTouch Apps/MyApp/MyApp/MyApp-Info.plist'

It would make sense to check out the URL/ PATHvariable you want to read from.

检查您要从中读取的URL/PATH变量是有意义的。

回答by inorganik

I had the same problem after trying to duplicate and rename a project.

尝试复制和重命名项目后,我遇到了同样的问题。

In Build Settings, I had to fix two paths before I finally got it compiling successfully:

在构建设置中,我必须修复两条路径才能最终成功编译:

  • Under Packaging, Info.plist
  • Under Apple LLVM 5.0 - Language, Prefix.pch
  • 包装下Info.plist
  • Apple LLVM 5.0 - Language 下Prefix.pch