$ sudo <Xcode>/Library/uninstall-devtools --mode=all )
/Users/admin/Library/developer/Xcode
第二步:安装3.2.6,注意要修改安装的目录为/Developer2,请参考下面的文章。下面的文章说的是3.2.5,但我用的是3.2.6也OK了。
第三步:安装4.1,默认安装在了/Developer目录中,安装成功后,把文件夹发名为/Developer3。
第四步:安装4.2.1,默认安装在了/Developer目录中。
安装好后,在系统信息里可以看到三个开发工具,手动修改为/Developer3的也被识别,如下图:
在安装3.2.6时,有一步,我去掉了对勾, 就是system tools和UNIX Developmanet.因为4.2.1与3.2.6的安装文档中都有类似的说明, 如下(4.2.1的):
The Xcode installer also installs system components and UNIX command line tools in a shared location on your Mac. Only one version of these components can exist on a computer at a time, and the last installed version replaces any previously installed set.
意思是 system tools和UNIX Developmanet只能存在一个版本,多次安装以最后一次为准。 我想4.2.1已带了system tools和UNIX Developmanet, 就应该不用3.2.6的了吧?但 4.2.1带的与3.2.6还的system tools和UNIX Developmanet是一类型的吗?