An error was encountered while attempting to communicate with this device

时间秒杀一切 提交于 2019-12-11 05:26:13

问题


I get this error while "Connect via network" option in new version of XCode9 and iOS11.

I checked the "Connect via network" box. After few seconds XCode gives me this error:

"An error was encountered while attempting to communicate with this device"

Anyone facing the same issue?

current configuration

  • XCode Version 9.0 beta 5 (9M202q)
  • iOS Beta 5
  • iPad Air

回答1:


I found that error causes when device lost connection for a moment. it's happen when you have damaged (or very old) cable. How ironic... trying to connect a device for ones for been wireless anymore, but cable...




回答2:


I got same error in my case Quit Xcode after that restart clean and build its working fine .




回答3:


I tried rebooting laptop, xcode but, it worked by cleaning and building the app multiple times(in my case- 4 times).




回答4:


There might be more than one reason for this error:

"An error was encountered while attempting to communicate with this device. (The service is invalid.)"

I hit this problem today after I transferred my iPad XCode project from one Mac to another. I was pretty sure there was nothing wrong with my USB cable, it was working just fine on the other Mac with the same iPad.

So I did the old XCode standby voodoo solution:

  1. in XCode, do a Product->Clean Build Folder;
  2. quit XCode;
  3. from the macOS Finder, delete the DerivedData folder for the project;
  4. launch XCode, rebuild and run.

It works just fine now.




回答5:


All I did was unplug the charger from the phone and replugged it back in. This solved it for me.



来源:https://stackoverflow.com/questions/45587463/an-error-was-encountered-while-attempting-to-communicate-with-this-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!