无法加载平台的path

当使用filemerge解决HG冲突时,我得到以下错误

 FileMerge[18002:707] Unable to load platform at path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform 

我在Git中有相同的FileMerge警告。 当我看看Xcode的首选项时,可以看到iPhoneSimulator和iPhoneOS平台都没有安装,但是当查看“/Applications/Xcode.app/Contents/Developer/Platforms”时,目录确实存在。

我不开发iOS,所以我删除了iPhoneOS.platform和iPhoneSimulator.platform,警告消失了。

如果您确实需要这些平台,请尝试从Xcode中正确地重新安装它们。

我试图将iPhoneSimulator.platform/Info.plist从二进制转换为xml,确认Filemerge不会再产生错误。 然后我把它转换回二进制文件,但是Filemerge还是很好的。

 $ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform $ sudo plutil -convert xml1 Info.plist $ sudo plutil -convert binary1 Info.plist 

免责声明:灵感来自@ user3761183!

我试图将所有*.platform/Info.plistbinaryxml1 ,并解决了这个问题。 奇怪…

我面对同样的问题,下面的命令解决了我的问题:

 sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/ 

这个问题对我来说有一个简单的解决scheme。 我只是启动了Xcode,并创build了一个iOS游戏项目。 Xcode问我在Mac上启用开发者模式,我做了。 然后我closures了Xcode,删除了项目,filemerge错误不再。

运行Xcode版本6.2