xcode 无法在路径加载平台

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12617644/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 01:40:07  来源:igfitidea点击:

Unable to load platform at path

xcodemercurialfilemerge

提问by Jayson

When using filemergeto solve HGconflict, I got the following error

使用filemerge解决HG冲突时,出现以下错误

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

回答by nox

I have the same FileMerge warning in Git. When I look inside Xcode's preferences, I can see that neither the iPhoneSimulator nor the iPhoneOS platforms are installed but the directories do exist when I look into "/Applications/Xcode.app/Contents/Developer/Platforms".

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

I don't develop for iOS, so I deleted both iPhoneOS.platform and iPhoneSimulator.platform and the warning went away.

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

If you do need those platforms, try to reinstall them properly from Xcode.

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

回答by Marc

And I tried converting iPhoneSimulator.platform/Info.plistfrom binary to xml, confirmed that Filemerge doesn't produce the error anymore. Then I converted it back to binary, and still, Filemerge is fine.

我尝试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

Disclaimer: inspired by @user3761183!

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

回答by user3761183

I tried converting all *.platform/Info.plistfrom binaryto xml1and it fixed the problem. Strange ...

我尝试将所有内容*.platform/Info.plist从转换binaryxml1并解决了问题。奇怪的 ...

回答by SheedySheedySheedy

There is a simple solution to this issue that worked for me. I merely started up Xcode and created an iOS playground project. Xcode asked me to enable developer mode on the Mac, which I did. I then closed Xcode, deleted the project and the filemerge error was no more.

这个问题有一个简单的解决方案,对我有用。我只是启动了 Xcode 并创建了一个 iOS 游乐场项目。Xcode 要求我在 Mac 上启用开发者模式,我做到了。然后我关闭了 Xcode,删除了项目,文件合并错误不再存在。

Running Xcode version 6.2

运行 Xcode 6.2 版

回答by 9to5ios

i face the same problem following command solved my problem:

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

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