XCode - 为什么我找不到文件? [英] XCode - why do I get a file not found?

查看:46
本文介绍了XCode - 为什么我找不到文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将 Airship(来自 UrbanAirship)目录添加到我的 iPhone/iPad 应用程序的 xcode 项目中.在我的构建设置>搜索路径>标题搜索路径"和构建设置>搜索路径>库搜索路径"中,我递归地指向这些目录.我还将 libuairship-1.2.1.a 文件 3 包含到所需的框架/库中.

I've added the Airship (from UrbanAirship) directory into my xcode project for my iPhone/iPad app. In my "build settings>search paths>header search paths" and "build settings>search paths>library search paths", I'm pointing to those directories recursively. I've also included the libuairship-1.2.1.a file3 into the required frameowrks/libraries.

当我进入我的 appdelegate.m 和 appdelegate.h 时,只要我输入 #import "UA",它就会自动补全我 #import "UAirship.h".所以我认为这很棒,因为我猜这意味着它知道文件存在!

When I go into my appdelegate.m and appdelegate.h, as soon as I type #import "UA", it autocompletes for me #import "UAirship.h". So i assume this is great ,because i guess it means it knows the file exists!

但是当我进行构建时,Xcode 抱怨无法找到文件 UAirship.h.我尝试输入 #import "directoryname/UAirship.h",但仍然找不到.

but when I do a build, it Xcode complains that the file UAirship.h can not be foudn. I tried typing #import "directoryname/UAirship.h", but it still can't find it.

我该如何解决这个问题?

How do i fix this problem?

推荐答案

这可能意味着该文件是您项目的一部分,但其路径不正确(无论出于何种原因).这将是可见的,因为如果您在项目浏览器中找到该文件,其名称将为红色.

This likely means that the file is part of your project, but its path is incorrect (for whatever reason). This will be visible in that if you locate the file in the project browser its name will be red.

假设是这种情况,您可以选择它并编辑文件位置属性,或将其从项目中删除,然后重新添加该文件.

Assuming that is the case you can select it and edit the files location properties, or delete it from the project and then add that file back again.

如果您从其他系统导入或打开项目,这很容易发生.

This can happen easily if you import or open projects from other systems.

问候

这篇关于XCode - 为什么我找不到文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆