在设备上运行时出现Xcode错误:“无法分配资源” [英] Xcode error when running on device: "Could not allocate a resource"

查看:291
本文介绍了在设备上运行时出现Xcode错误:“无法分配资源”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在任何设备上运行时,我收到错误无法分配资源。我已经看到这是一个可能的解决办法:

I'm getting the error "Could not allocate a resource" when I try to run on any of my devices. I've seen this as a possible fix:

sudo rm -rf /var/db/lockdown/

我已经尝试过并重启了我的机器几次,但没有运气。我也尝试过改变USB端口。在使用AppCleaner卸载后我也重新安装了Xcode。

I've tried that and restarted my machine a handful of times, but no luck. I also tried changing USB ports. I've reinstalled Xcode as well after uninstalling with AppCleaner.

除了错误之外,每当我连接设备时它都会问我信任这台电脑吗?

In addition to the error, whenever I connect a device it asks me "Trust This Computer?"

这种情况发生在带闪电的iPhone 5和iPhone 6+以及带有旧式连接器的iPad 3上。

This is occurring on an iPhone 5 and iPhone 6+ with lightning, as well as an iPad 3 with the old style connector.

[更新]
我现在也重新安装iTunes无效。
同时重置PRAM和SMC。

[Updates] I've now also reinstalled iTunes to no effect. Also reset PRAM and SMC.

推荐答案

删除该文件夹后,需要重新创建并获得适当的权限,因为iTunes需要对该文件夹的rw权限:

After you delete that folder, you need to recreate again and make proper permissions, because iTunes need rw rights to that folder:

   sudo mkdir /var/db/lockdown
   sudo chmod go+w  /var/db/lockdown

没有打开iTunes。那一切都应该没问题。
另外请记住/ private / var / db / lockdown [镜像]可能需要相同的操作

without having iTunes open. Then everything should be fine. Also keep in mind the same operation may be required for /private/var/db/lockdown [a mirror]

如果你将旧的Mac移动到新的,确保/var/db/lockdown/SystemConfiguration.plist包含您的mac实际UUID。通常,建议不要删除系统文件夹,而不知道你在做什么。 ;)其实我复制你的问题移动/ var / db / lockdown到另一个位置,启动iTunes,得到错误。然后重新创建等。

If you moved and old Mac to a new one, make sure /var/db/lockdown/SystemConfiguration.plist contains your mac actual UUID . Generally it is not recommended to delete a system folder, anyway, without really knowing what you do. ;) Actually I replicated your problem moving /var/db/lockdown to another location, starting iTunes, getting error. Then recreate etc.

这篇关于在设备上运行时出现Xcode错误:“无法分配资源”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆