Xcode 在调试时失去与设备的连接
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11915764/
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 loses connection to device while debugging
提问by buildsucceeded
My app has recently started exhibiting a strange behaviour. When I build and run from Xcode, the app launches until it hits the transition from the animated launch screen to the main screen of my app. At that point Xcode says "finished running yourApp on theDevice" and the app itself sometimes continues running on the device, or sometimes freezes.
我的应用程序最近开始表现出奇怪的行为。当我从 Xcode 构建和运行时,应用程序会启动,直到它从动画启动屏幕过渡到我的应用程序的主屏幕。那时 Xcode 会说“完成在设备上运行您的应用程序”并且应用程序本身有时会继续在设备上运行,有时会冻结。
Once this has happened, Xcode behaves as though my device is disconnected until I physically unplug and replug the USB cable.
一旦发生这种情况,Xcode 的行为就好像我的设备已断开连接,直到我拔下并重新插入 USB 电缆。
Anyone run into this before and found a solution?
有没有人遇到过这个问题并找到了解决方案?
Potentially related, I have recently begun to see the "The device does not recognize this host" error periodically (mentioned hereand here), although my app does not use Entitlements.
可能与此相关,尽管我的应用程序不使用权利,但我最近开始定期看到“设备无法识别此主机”错误(此处和此处提到)。
回答by dulgan
I'd suggest trying with another cable plugged in another port.
我建议尝试将另一根电缆插入另一个端口。
回答by Abu Saad Papa
I had a similar issue and from this linkstarted checking my project for images,textures etc larger than 1024 x 1024 and found one png which was around 2732 x 2048. After reducing its size I am not getting this bug.
我有一个类似的问题,从这个链接开始检查我的项目中是否有大于 1024 x 1024 的图像、纹理等,并发现了一个大约 2732 x 2048 的 png。减小它的大小后,我没有遇到这个错误。