Xcode构建和运行错误:“进程启动失败:无法获取进程216的任务”

时间:2022-09-18 23:41:21

After updating to Mavericks and making sure I got the latest updates of Xcode installed as well, Xcode suddenly fails to launch apps on the device.

在更新到Mavericks并确保我安装了最新的Xcode更新后,Xcode突然无法在设备上启动应用程序。

It installs the app on my iPhone but then before running it, throws this error:

它在我的iPhone上安装应用程序,但在运行之前,抛出此错误:

Process launch failed: Failed to get the task for process 216

进程启动失败:无法获得进程216的任务

This is how the Code Signing settings look like since the update:

这是自更新以来代码签名设置的样子:

Xcode构建和运行错误:“进程启动失败:无法获取进程216的任务”

Also checked Scheme and it runs in Debug configuration.

还检查了Scheme,它在Debug配置中运行。

Is this a known issue with Mavericks? How to fix it?

这是小牛队的一个已知问题吗?怎么解决?

3 个解决方案

#1


51  

I got this error when signing it with a distribution profile. In my case, it was an Ad Hoc profile.

使用分发配置文件对其进行签名时出现此错误。就我而言,这是一个Ad Hoc配置文件。

It was confusing to me because you can't 'run' and install the app directly to your device if you sign it with a distribution profile. For my case, I use testflightapp and was able to upload the IPA.

这对我来说很困惑,因为如果您使用分发配置文件对其进行签名,则无法“运行”并将应用程序直接安装到您的设备上。对于我的情况,我使用testflightapp并能够上传IPA。

The error message is not very descriptive of the problem.

错误消息不是对问题的描述。

Also, if you are stuck, make sure you check the profiles for both the 'Project' and the 'Target'

此外,如果您遇到困难,请务必检查“项目”和“目标”的配置文件

#2


17  

Figured it out. My Developer Certificate was marked as "Expired" in Keychain (search Spotlight for "Keychain", then click on the "user" tab on the left). I deleted it, then went to Xcode > Preferences > Accounts, selected my ID and clicked on "View Details", then clicked the Update icon at the bottom left. Xcode re-installed the renewed certificate. Then I went to Build Settings and manually set the Debug configuration to use the Developer certificate Xcode just reinstalled for me.

弄清楚了。我的开发人员证书在钥匙串中被标记为“过期”(搜索Spotlight为“钥匙串”,然后点击左侧的“用户”标签)。我删除它,然后转到Xcode>首选项>帐户,选择我的ID并单击“查看详细信息”,然后单击左下角的“更新”图标。 Xcode重新安装了续订的证书。然后我去了Build Settings并手动设置Debug配置以使用刚为我重新安装的Developer证书Xcode。

#3


7  

I think you use the distribution profile, you can revise like this:

我认为您使用分发配置文件,您可以这样修改:

[Xcode构建和运行错误:“进程启动失败:无法获取进程216的任务”]

[]

#1


51  

I got this error when signing it with a distribution profile. In my case, it was an Ad Hoc profile.

使用分发配置文件对其进行签名时出现此错误。就我而言,这是一个Ad Hoc配置文件。

It was confusing to me because you can't 'run' and install the app directly to your device if you sign it with a distribution profile. For my case, I use testflightapp and was able to upload the IPA.

这对我来说很困惑,因为如果您使用分发配置文件对其进行签名,则无法“运行”并将应用程序直接安装到您的设备上。对于我的情况,我使用testflightapp并能够上传IPA。

The error message is not very descriptive of the problem.

错误消息不是对问题的描述。

Also, if you are stuck, make sure you check the profiles for both the 'Project' and the 'Target'

此外,如果您遇到困难,请务必检查“项目”和“目标”的配置文件

#2


17  

Figured it out. My Developer Certificate was marked as "Expired" in Keychain (search Spotlight for "Keychain", then click on the "user" tab on the left). I deleted it, then went to Xcode > Preferences > Accounts, selected my ID and clicked on "View Details", then clicked the Update icon at the bottom left. Xcode re-installed the renewed certificate. Then I went to Build Settings and manually set the Debug configuration to use the Developer certificate Xcode just reinstalled for me.

弄清楚了。我的开发人员证书在钥匙串中被标记为“过期”(搜索Spotlight为“钥匙串”,然后点击左侧的“用户”标签)。我删除它,然后转到Xcode>首选项>帐户,选择我的ID并单击“查看详细信息”,然后单击左下角的“更新”图标。 Xcode重新安装了续订的证书。然后我去了Build Settings并手动设置Debug配置以使用刚为我重新安装的Developer证书Xcode。

#3


7  

I think you use the distribution profile, you can revise like this:

我认为您使用分发配置文件,您可以这样修改:

[Xcode构建和运行错误:“进程启动失败:无法获取进程216的任务”]

[]