XCode 4.5.2 选择不是可以重命名的类型 [英] XCode 4.5.2 The selection is not a type that can be renamed

查看:27
本文介绍了XCode 4.5.2 选择不是可以重命名的类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重命名变量/类对我来说似乎被破坏了.XCode 4.5.2 出现一个菜单,询问我想将变量重命名为什么,我输入一个名称并点击预览,然后出现另一个屏幕,显示消息选择不是一种可以重命名.".

Renaming variables/classes seems to be broken for me. XCode 4.5.2 brings up a menu asking me what I'd like to rename the variable to, I enter a name and hit preview, and then another screen shows up which brings up the message "The selection is not a type that can be renamed.".

我尝试删除派生数据(通过命令行,也通过组织者),但没有解决.有人找到解决方案了吗?有几个人在旧版本的 XCode 上遇到过这个问题,但他们说它在新版本上得到了修复(但我使用的是最新版本).

I've tried deleting derived data (via command line, and also via the organizer), it didn't fix it. Anyone found a solution yet? There's been a couple people who've ran into this on older versions of XCode, but they said it was fixed on newer versions (yet I'm using the latest version).

推荐答案

在 Xcode 5.0.1 无缘无故自发停止工作后,我刚刚花了大约一个小时试图让重构工作再次在 Xcode 5.0.1 上工作.

I've just spent about an hour trying to get refactoring working again on Xcode 5.0.1 after it spontaneously stopped working for no apparent reason.

我不确定实际上是哪个步骤修复了它,因为即使我退出它,Xcode 似乎仍在保持某些进程运行,所以它实际上在机器重新启动后开始工作,但这些是我采取的步骤:

I'm not sure what step actually fixed it because it seemed Xcode was keeping certain processes running even when I was quitting it, so it actually started working after a reboot of the machine, but these are the steps I took:

  • 退出 Xcode
  • 删除 ~/Library/Developer/Xcode/DerivedData
  • 已删除 .xcodeproj/project.xcworkspace/xcuserdata
  • 已删除 .xcodeproj/xcuserdata/.xcuserdatad
  • 重启
  • 重启Xcode
  • 产品 -> 清理构建文件夹

在那之后,重构似乎又恢复了生机.删除 xcuserdata 确实意味着 Xcode 丢失了我的一些布局设置等,但拥有一个有效的重构工具更有用!

After that, refactoring seemed to spring back into life. Deleting the xcuserdata did mean that Xcode lost some of my layout settings, etc but having a working refactor tool was more useful!

这篇关于XCode 4.5.2 选择不是可以重命名的类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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