Xcode 启动远程程序时出错
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6728620/
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
Xcode Error launching remote program
提问by Andrew
I've seen this all over the place on stack overflow, but everyone else's solution doesn't work for me. Help! Please!
我在堆栈溢出的所有地方都看到了这一点,但其他人的解决方案对我不起作用。帮助!请!
I'm trying to test my app on my iPhone, it's run perfectly fine up until I updated Xcode and the iOS (I've also been on v4 though). I can't get it to sync the app over at all. I've tried dumping this file/folder, dumping caches, quitting relaunching Xcode, Rebooting the Computer, Restarting the phone, everything I can think of to no avail. Any Ideas?
我正在尝试在我的 iPhone 上测试我的应用程序,它运行得非常好,直到我更新了 Xcode 和 iOS(不过我也一直在使用 v4)。我根本无法让它同步应用程序。我试过转储这个文件/文件夹,转储缓存,退出重新启动 Xcode,重新启动计算机,重新启动手机,我能想到的一切都无济于事。有任何想法吗?
Error launching remote program: No such file or directory
(/Users/andrew/Library/Developer/Xcode/DerivedData/BTC_Exchange-drzeigaqfnjtatglpppiwxmscsoj/Build/Products/Debug-iphoneos/BTC Exchange.app/BTC Exchange).
And the file does exist, there are no permissions issues from what I can tell and I ran a whole disk permissions check too.
而且该文件确实存在,据我所知,没有权限问题,我也运行了整个磁盘权限检查。
回答by Dave Wood
Go here: ~/Library/Developer/Xcode/DerivedData and clear out all the old builds. It'll work again without having to do the project renaming etc.
去这里:~/Library/Developer/Xcode/DerivedData 并清除所有旧版本。它会再次工作,而无需进行项目重命名等。
回答by Flanker
Try to clear ~/Library/Developer/Xcode/DerivedData and RESTART Xcode.
尝试清除 ~/Library/Developer/Xcode/DerivedData 并重新启动 Xcode。
回答by Matt.M
I was having the exact same issue as you. I tried everything you did, and just like you noneof those solutions worked for me. Just now I was finally able to get it to work (whew). Here is how I did it:
我和你遇到了完全相同的问题。我尝试了你所做的一切,就像你一样,这些解决方案都不适合我。刚才我终于能够让它工作(哇)。这是我如何做到的:
Rename your project to anything different. Do this in Xcode 4 by slowlydouble clicking on the project name in the Project Navigator.
Go to your project info.plist. Change the bundle identifier to match the new project name. Also change the bundle name just to be safe...
Do a command-shift-kto clean the project. Then run!
将您的项目重命名为任何不同的名称。在 Xcode 4 中通过在 Project Navigator 中缓慢双击项目名称来执行此操作。
转到您的项目 info.plist。更改包标识符以匹配新项目名称。为了安全起见,还要更改捆绑包名称...
做一个command- shift-k来清理项目。那就跑吧!
That worked for me. Good luck.
那对我有用。祝你好运。
回答by MadNik
Go : ~/Library/Developer/Xcode/DerivedData
去:~/Library/Developer/Xcode/DerivedData
Clear user Data
清除用户数据
Clean the Project
清理项目
Quit the xcode(make sure you quite. Look at the picture)
退出xcode(确保你安静。看图)
![Quit xCode][1]
回答by E-Riddie
Issue
问题
This usually happens when you run multiple projects which have stored their data at derived data
, and therefore Xcode becomes a mess sometimes for different reasons, usually indexing a project to two different Workspaces
当你运行它在有他们的数据存储多个项目,这通常发生derived data
,因此Xcode中有时会变成一个烂摊子不同的原因,通常是索引一个项目,两个不同的工作区
Solution
解决方案
Follow these steps to get out of the mess :
请按照以下步骤摆脱混乱:
- Quit Xcode if it is opened
- Go to derived data's folder located at ~/Library/Developer/Xcode/DerivedData
- Delete everything on that folder (Also empty the trash)
- Open up Xcode and do a Product Cleanby pressing Command-Shift-K
- Run your project and everything will be back to normal
- 如果 Xcode 已打开,请退出
- 转到位于~/Library/Developer/Xcode/DerivedData 的派生数据文件夹
- 删除该文件夹中的所有内容(同时清空垃圾箱)
- 打开 Xcode并按- -执行Product CleanCommandShiftK
- 运行你的项目,一切都会恢复正常
Background
背景
With Xcode 4 came the concept of a workspace that allows multiple projects to be grouped together. Each workspace gets a unique set of symbol indexes, build products, window layouts, etc., otherwise referred to by Xcode as derived data
Xcode 4 带来了工作区的概念,允许将多个项目组合在一起。每个工作区都有一组唯一的符号索引、构建产品、窗口布局等,否则 Xcode 将其称为派生数据
回答by Ryan Bavetta
For me, doing Product -> Clean then restarting XCode worked.
对我来说,做 Product -> Clean 然后重新启动 XCode 工作。
回答by Peter_from_NYC
Getting rid of DerivedData and restarting Xcode worked.
摆脱 DerivedData 并重新启动 Xcode 工作。
It was the suggestion of Dave Wood Feb 17 at 8:20
这是 Dave Wood 的建议 2 月 17 日 8:20
"Try to clear ~/Library/Developer/Xcode/DerivedData and RESTART Xcode."
“尝试清除 ~/Library/Developer/Xcode/DerivedData 并重新启动 Xcode。”
In my case, I had about 7 different "DerivedData"s, which I found by doing a search of DerivedData in finder and deleting them all, closing Xcode, and rebooting.
就我而言,我有大约 7 个不同的“DerivedData”,这是通过在 finder 中搜索 DerivedData 并将它们全部删除、关闭 Xcode 并重新启动而找到的。
Thank you.
谢谢你。
回答by Gabriel Centenaro
Since none of the answers above worked for me, i've decided to share what i've found out.
由于上面的答案都不适合我,我决定分享我的发现。
My problem was the UIRequiredDeviceCapabilities values on the Info.plist file. I added they key gps when what I needed was location-services, since my app is supposed to work not only for iPhone, but for iPod touch as well. When I tried to debug it on the Simulator it all ran just fine, but on the iPod touch that I use for debugging I kept getting that stupid message.
我的问题是 Info.plist 文件中的 UIRequiredDeviceCapabilities 值。当我需要定位服务时,我添加了他们的关键 GPS,因为我的应用程序应该不仅适用于 iPhone,也适用于 iPod touch。当我尝试在模拟器上调试它时,一切都运行得很好,但是在我用于调试的 iPod touch 上,我一直收到那条愚蠢的消息。
Hope my answer helps someone :)
希望我的回答对某人有所帮助:)
回答by Vyacheslav Dulnev
Such problems happens for me when I tried to run application on IPhone 3g using XCode 4.4.1 (4F1003). Gabriel's solution help me find out what is wrong - in UIRequiredDeviceCapabilities
was "armv7"
value, I changed it to "armv6"
and error disappeared.
当我尝试使用 XCode 4.4.1 (4F1003) 在 iPhone 3g 上运行应用程序时,就会发生这样的问题。Gabriel 的解决方案帮助我找出问题所在 - 在UIRequiredDeviceCapabilities
was "armv7"
value 中,我将其更改为"armv6"
并且错误消失了。
回答by tranvv
Just wanted to put my own solution here since this has been happening to me non-stop!
只是想把我自己的解决方案放在这里,因为这一直在我身上发生!
- close xcode
- delete the derived data folder
- unplug and restart the device
- then re-open xcode and power on and reconnect the device
- 关闭 xcode
- 删除派生数据文件夹
- 拔下并重新启动设备
- 然后重新打开xcode并打开电源并重新连接设备
that has been working for me. These steps individually have never worked for me so I just do them all.
这对我有用。这些步骤单独对我来说从未奏效,所以我只是全部完成。