Xcode:“对 NSString 的引用不明确"; [英] Xcode: "Reference to NSString is ambiguous"
问题描述
我不明白这样的事情是如何发生的:我创建了一个 Xcode 项目 (Xcode 6) 并且我从以前的项目中导入了一些文件(Storyboard、Images.xcassets 文件以及一些 .h 和 .m文件)
I don't understand how such a thing can happen: I have created an Xcode project (Xcode 6) and I imported some files from a previous project (a Storyboard, the Images.xcassets file and some .h and .m files)
现在,当我在代码中导入其中的一些标头时,使用 NSString 的每一行都会报告错误对 NSString 的引用不明确".
Now when I import some of those headers in my code, each line using a NSString reports the error "Reference to NSString is ambiguous".
这是一个已知问题,如何解决?
Is this a known issue, how to solve that?
推荐答案
原因:工程索引损坏,重建索引
解决方法:Xcode -> Window -> Organizer -> 选择项目,找到Derived Data,点击后面的Delete,然后重启XCode即可.
Workaround: Xcode -> Window -> Organizer -> select the project, find Derived Data, click on the back of Delete, and then restart XCode can.
这篇关于Xcode:“对 NSString 的引用不明确";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!