Android adb “Unable to open sync connection!”

前端 未结 18 2176
小蘑菇
小蘑菇 2020-12-07 09:21

I can run and debug my Android app on my phone just fine, most of the time. Then, seemingly randomly, when I try to run or debug my app from Eclipse, the Console in Eclipse

相关标签:
18条回答
  • 2020-12-07 09:58

    Try this,

    Disabling USB debugging on the phone and then re-enabling under

    Settings -> Applications -> Development -> USB debugging

    its works fine.

    0 讨论(0)
  • 2020-12-07 09:59

    What helps for me is the following: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    If you are debugging on AndroidX86 (or otherwise have root access to your Android developer machine) Kill the "adbd" process.. and let it restart.

    e.g.

    [On Android VM]

    • kill adbd (e.g. kill `ps a| grep adbd | awk ' { print $2 } ' `)
    • /sbin/adbd will restart automatically

    [On DEV station]

    • [dev station] ./adb disconnect
    • [dev station] ./adb connect

    If you don't have root, probably toggling USB debugging, rebooting, etc could also help. As it also restarts adbd ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    0 讨论(0)
  • 2020-12-07 09:59

    This solution worked for me

    1. Click Revoke USB debugging authorizations.
    2. Click OK.
    3. Reattach USB.
    4. Click OK for Permissions.

    0 讨论(0)
  • 2020-12-07 10:00

    This may also be related to a "too many open files" issue. I manually tried to install the app when getting the "sync" error above and that's when I got the "too many open files" clue. one brute workaround, based on some old posts, seems to be to restart the phone, and one google engineer suggested doing it twice, the second time before it goes into sleep mode the first time (details on why in the post).

    That was a few years ago, and maybe they've fixed it, or just did some things to get around it in the usual cases and the reinstall-as-part-of-development is not a case that it addresses.

    0 讨论(0)
  • 2020-12-07 10:02

    I was having exactly the same problem, but I already had my phone connected to the computer's USB port. Sometimes disconnecting and reconnecting the cord worked but then it stopped working completely. However, disabling USB debugging on the phone and then re-enabling it has worked so far. Hopefully it keeps working! These fixes really seem like silly hacks.. I'm not sure what the underlying problem is.

    0 讨论(0)
  • 2020-12-07 10:03

    Restarting the phone has also fixed this problem for me whenever reseting the usb cable didnt fix it

    0 讨论(0)
提交回复
热议问题