V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
bitweaver
V2EX  ›  问与答

刚学 Cocoa 用 XCode 遇到一个令人困惑的问题

  •  
  •   bitweaver · 2014-11-12 03:52:30 +08:00 · 2101 次点击
    这是一个创建于 3460 天前的主题,其中的信息可能已经有所发展或是发生改变。
    up主写代码时手贱打开了NSButton.h看了看,想到以前写java时候idea是不允许我修改sdk文件的,于是我想试一试osx。结果发现改了一个字母没任何错误提示,索性又改了回去。从此编译运行便会报出这样的错误:
    '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSButton.h' has been modified since the precompiled header ...
    1、project -> clean
    2、windows -> organizer -> delete(derived data)
    3、重新建个工程
    均报同样错误,无限苦闷中。。。
    于是给10.10的sdk文件夹改了一个名字,现在重新下载中,400多M,速度很慢。
    不知道有大牛知道如何解决这样弱弱的问题吗?
    cdfmr
        1
    cdfmr  
       2014-11-12 08:32:15 +08:00
    把NSButton.h文件touch到一个较早的时间看看。
    wezzard
        2
    wezzard  
       2014-11-12 09:10:53 +08:00 via iPhone   ❤️ 1
    Delete ~/Library/Developer/Xcode/DerivedData
    bitweaver
        3
    bitweaver  
    OP
       2014-11-12 09:17:26 +08:00
    @cdfmr 查看了NSButton.h所在文件夹内所有文件的修改时间,居然有两种(10.3,10.4),两个时间都touch了一遍,xcode都提示NSButton.h被改了。
    bitweaver
        4
    bitweaver  
    OP
       2014-11-12 09:20:36 +08:00
    @wezzard 果然删掉就好了,多谢。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2348 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 13:00 · PVG 21:00 · LAX 06:00 · JFK 09:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.