无法更新到 Xcode 8

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39536537/
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 09:15:53  来源:igfitidea点击:

Unable to update to Xcode 8

xcodexcode8

提问by derdida

I would like to update to Xcode 8, but when I start the App Store it just shows me an Openbutton, but my existing Version is 7.3.1

我想更新到 Xcode 8,但是当我启动 App Store 时它只显示一个Open按钮,但我现有的版本是 7.3.1

The requirements should be El Capitan 10.11.5 - I have 10.11.6 installed.

要求应该是 El Capitan 10.11.5 - 我安装了 10.11.6。

Why is there no Updatebutton?

为什么没有Update按钮?

enter image description here

enter image description here

采纳答案by Dave Wood

Check if you have multiple installations of Xcode on your system. The App Store often gets confused and loads one you're not considering, such as the version on your back up drive. It's possible it has updated a different installation than the one it launches as well.

检查您的系统上是否安装了多个 Xcode。App Store 经常会感到困惑并加载您没有考虑的版本,例如备份驱动器上的版本。它可能更新了与它启动的安装不同的安装。

Executing the following command in a terminal window should list all installations of Xcode the App Store may find.

在终端窗口中执行以下命令应该会列出 App Store 可能找到的所有 Xcode 安装。

mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'"

mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'"

When you have Xcode open (from hitting Openin the store), right click the Xcode icon on your dock, select Options, and Show in Finder. Does the installation it shows match up with the one you expected it to launch?

当您打开 Xcode(通过Open在商店中点击)时,右键单击 Dock 上的 Xcode 图标,选择OptionsShow in Finder。它显示的安装是否与您期望它启动的安装相匹配?

If you specifically open each Xcode installation the mdfindcommand found, are any of them Xcode 8?

如果您专门打开每个 Xcode 安装mdfind找到的命令,它们中的任何一个是 Xcode 8 吗?

You can control which installation of Xcode the App Store will update. Check each of the app folders, and look for a Contents/_MASReceiptfolder. Ensure the installation you want to update has that (and a receiptfile inside that), and delete the _MASReceiptfolder for all of the other versions.

您可以控制 App Store 将更新哪个 Xcode 安装。检查每个应用程序文件夹,并查找一个Contents/_MASReceipt文件夹。确保您要更新的安装具有该(以及其中的receipt文件),并删除_MASReceipt所有其他版本的文件夹。

Now the App Store app should update the correct installation for you.

现在 App Store 应用程序应该为您更新正确的安装。

回答by Vee

All I had to do was restart my mac. Then, went to the App Store and saw "Update" instead of "Open".

我所要做的就是重新启动我的 mac。然后,去 App Store 看到“更新”而不是“打开”。