在MAC下打开提示错误:“SwtichHosts! Error”
之前使用是OK的,现在打开突然弹出这个提示,就不能用了,重新下载安装也没有用,求解决方案

囧……,什么提示都没有呢……
不知道是不是配置文件出错了?配置文件都在“~/.SwitchHosts”目录里。在命令行下运行一下下面的命令,再重新打开SwitchHosts! 试试呢?
$ mv ~/.SwitchHosts ~/.SwitchHosts_backup
On Thursday, May 16, 2013, 英布 [email protected] wrote:
之前使用是OK的,现在打开突然弹出这个提示,就不能用了,重新下载安装也没有用,求解决方案 < https://f.cloud.github.com/assets/404245/510525/9275b6e8-bdd9-11e2-93e0-3ad17ea91197.png
— Reply to this email directly or view it on GitHub.< https://github.com/notifications/beacon/wItgTd0IgTPNkdEdgs3NGnZHoohVPLrG-PrUqiaZAD1oO5YEsbL83PgmFVaAQirM.gif
不行啊,我也把程序卸载了,把~/.SwitchHosts和~/.SwitchHosts_backup 都删干净了重新安装,还是提示这个错误,55555555555
在 2013年5月16日上午11:49,oldj [email protected]写道:
囧……,什么提示都没有呢……
不知道是不是配置文件出错了?配置文件都在“~/.SwitchHosts”目录里。在命令行下运行一下下面的命令,再重新打开SwitchHosts! 试试呢?
$ mv ~/.SwitchHosts ~/.SwitchHosts_backup
On Thursday, May 16, 2013, 英布 [email protected] wrote:
之前使用是OK的,现在打开突然弹出这个提示,就不能用了,重新下载安装也没有用,求解决方案 <
https://f.cloud.github.com/assets/404245/510525/9275b6e8-bdd9-11e2-93e0-3ad17ea91197.png
— Reply to this email directly or view it on GitHub.<
https://github.com/notifications/beacon/wItgTd0IgTPNkdEdgs3NGnZHoohVPLrG-PrUqiaZAD1oO5YEsbL83PgmFVaAQirM.gif
— Reply to this email directly or view it on GitHubhttps://github.com/oldj/SwitchHosts/issues/36#issuecomment-17979758 .
我也是这样。根本打不开。已经把日志发给作者了
2014-8-17 13:57:12.000 com.apple.launchd.peruser.501[168]: (com.macpaw.CleanMyMac2Helper.trashWatcher) Throttling respawn: Will start in 6 seconds 2014-8-17 13:57:13.244 storeagent[311]: multibyte ASN1 identifiers are not supported. 2014-8-17 13:57:13.403 WindowServer[91]: _CGXSetWindowBackgroundBlurRadius: Invalid window 0xffffffff 2014-8-17 13:57:33.135 SwitchHosts![1744]: CoreText performance note: Client called CTFontCreateWithName() using name ".Lucida Grande UI" and got font with PostScript name ".LucidaGrandeUI". For best performance, only use PostScript names when calling this API. 2014-8-17 13:57:33.135 SwitchHosts![1744]: CoreText performance note: Set a breakpoint on CTFontLogSuboptimalRequest to debug. 2014-8-17 13:57:33.144 SwitchHosts![1744]: CoreText performance note: Client called CTFontCreateWithName() using name ".Lucida Grande UI" and got font with PostScript name ".LucidaGrandeUI". For best performance, only use PostScript names when calling this API. 2014-8-17 13:57:33.177 WindowServer[91]: CGXSetWindowListSystemAlpha: Invalid window 1671 (index 0/1) 2014-8-17 13:57:33.217 SwitchHosts![1744]: CoreText performance note: Client called CTFontCreateWithName() using name ".Lucida Grande UI" and got font with PostScript name ".LucidaGrandeUI". For best performance, only use PostScript names when calling this API. 2014-8-17 13:57:33.284 SwitchHosts![1744]: SwitchHosts! Error 2014-8-17 13:57:35.489 Console[1751]: setPresentationOptions called with NSApplicationPresentationFullScreen when there is no visible fullscreen window; this call will be ignored.
公共Hosts太多的原因
1、删除 .SwitchHosts
2、清空 /private/etc/hosts
3、删除 ~/Library/Saved Application State/net.oldj.switchhosts.savedState
公共 hosts 一屏以内
感谢 @mycoin 。
ps. Mac 用户可以试试新版本:https://github.com/oldj/SwitchHosts/releases/tag/v3.0.0 。:)