Xcode 引用旧的/已删除的框架,导致多个接口声明 [英] Xcode referencing old/removed frameworks, causing multiple interface declarations

查看:26
本文介绍了Xcode 引用旧的/已删除的框架,导致多个接口声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试构建时遇到接口重新声明错误,因为 xcode 一直在引用我已经从项目中删除的这些旧框架和标头.我已经筛选了我的构建阶段和构建设置,似乎没有任何东西指向这些文件.

I'm getting interface re-declaration errors when I'm trying to build because xcode keeps referencing these old frameworks and headers that I've already removed from the project. I've sifted through my build phases and build settings and nothing seems to point to those files.

有趣的是,当 xcode 向我显示我的错误以及应该重新声明接口的代码行时,当我单击在项目导航器中显示"时,它不会显示任何特定文件.但是,如果我要求它在 finder 中显示",它会立即在我的实际项目目录(而不是 xcode 项目目录)中找到该文件.所以这意味着 XCode 正在拾取我留在项目目录中的不需要的框架.我不希望 XCode 这样做.我该如何清理这个?我试过清理,重新启动 xcode 并重新启动.

The funny thing is when xcode shows me my error and the line of code where the interface is supposedly redeclared, it won't show me any specific file when I click "Show in project navigator". However, if I ask it to "Show in finder", it instantly locates the file in my actual project directory (not xcode project directory). So this means that XCode is picking up unwanted frameworks that I've left in my project directory. I don't want XCode to do this. How do I clean this up? I've tried cleaning, restarting xcode and rebooting.

我查看了另一个具有相同问题的 SO 讨论,但用户没有给出正确的解决方案 (http://stackoverflow.com/questions/11759444/xcode-referencing-old-framework).如何禁用自动框架搜索?

I looked at another SO discussion with the same problem but the user didn't give a proper solution (http://stackoverflow.com/questions/11759444/xcode-referencing-old-framework). How does one go about disabling the automatic framework searching?

推荐答案

以防万一:你检查过 FRAMEWORK_SEARCH_PATHS 吗?(项目构建设置).我遇到了类似的情况,发现那里引用了我删除的旧路径,并且成功了.

Just in case: have u checked FRAMEWORK_SEARCH_PATHS ? (Project Build Settings). I had a similar situation and found there references to the old paths which I removed and that did the trick.



补充:当我将 Xcode-Project 移动到另一个位置时,编译器抱怨库搜索路径"指向旧位置.请参阅 => 构建设置,库搜索路径".

这篇关于Xcode 引用旧的/已删除的框架,导致多个接口声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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