我尝试在eclipse上运行我的应用程序,但我发现了这些错误。这是第一次面临的,所以请你给我任何关于这些错误的想法。我目前正在使用Nexus mobile。
[2011-08-04 15:59:09 - App] Android Launch!
[2011-08-04 15:59:09 - App] adb is running normally.
[2011-08-04 15:59:09 - App] Performing com.horror.android.AppActivity activity launch
[2011-08-04 15:59:09 - App] Automatic Target Mode: using device 'HT9CRP800333'
[2011-08-04 15:59:09 - App] Uploading Test.apk onto device 'HT9CRP800333'
[2011-08-04 15:59:09 - App] Failed to install Test.apk on device 'HT9CRP800333': Unable to open sync connection!
[2011-08-04 15:59:09 - App] java.io.IOException: Unable to open sync connection!
[2011-08-04 15:59:09 - App] Launch canceled!
为什么我得到 java.io.IOException:无法打开同步连接! 。 在此先感谢。
答案 0 :(得分:49)
进入设置 - >开发 - >,然后尝试禁用“USB调试”并启用相同的
答案 1 :(得分:28)
不,不是关于你的代码。 尝试将usb插入,然后重新插入。如果没有帮助尝试重启设备。通常它在这种情况下适用于我。
答案 2 :(得分:4)
从您的计算机:
尝试重新启动ADB:
adb kill-server
adb start-server
对于Linux(我必须在Ubuntu上执行此操作):
sudo -i (for root)
adb kill-server
adb start-server
我在'.bashrc'中创建的脚本:
alias fixadb="sudo sh -c '/path/to/adb kill-server'; sudo sh -c '/path/to/adb start-server';"
对于Windows:
Ctrl + Alt + Del - Open Task Manager
Kill adb.exe
Right-click on adb.exe, Run as Administrator
USB端口:
Try switching USB ports, this usually helps me every once in a while.
来自您的手机:
Android SDK< 11:
Settings > Development > Try disabling and re-enabling 'USB debugging'
Android SDK> 11:
Settings > Developer Options > Try disabling and re-enabling 'Android debugging'
尝试重新启动手机