在手机上部署和调试 Android 应用程序时出现间歇性问题
我目前正在调查一个问题,由于某种原因 eclipse 插件/adb 失去了与我手机的连接,并向我显示消息:
[2011-03-05 22:53:40 - projectOne] 尝试将调试器连接到 'com.testbed .input' 在端口 8633 上 [2011-03-05 23:04:02 -projectOne] ------------------------------------------ [2011-03-05 22:40:42 - projectOne] Android 发布! [2011-03-05 22:40:42 - projectOne] adb运行正常。 [2011-03-05 22:40:42 - projectOne] 执行 com.testbed.input.MainActivity 活动启动 [2011-03-05 22:40:42 - projectOne] 自动目标模式:无法检测设备兼容性。请选择目标设备。
在设备监视器日志上我看到:
[2011-03-05 23:10:13 - Logcat]设备(HT971L900496)请求被拒绝:设备离线 java.io.IOException:设备(HT971L900496)请求被拒绝:设备离线
我不知道它是什么,它只是有一天完美地工作,然后我得到了这个。我希望对工具链有更专业知识的人能够提供帮助,因为它确实减慢了我的速度,所以我决心弄清楚这一点。
非常感谢
I am currently investigating a problem I have where for some reason eclipse plugin/adb loses connection to my phone and gives me the message:
[2011-03-05 22:53:40 - projectOne] Attempting to connect debugger to 'com.testbed.input' on port 8633
[2011-03-05 23:04:02 - projectOne] ------------------------------
[2011-03-05 22:40:42 - projectOne] Android Launch!
[2011-03-05 22:40:42 - projectOne] adb is running normally.
[2011-03-05 22:40:42 - projectOne] Performing com.testbed.input.MainActivity activity launch
[2011-03-05 22:40:42 - projectOne] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
And on the device monitor log I see this:
[2011-03-05 23:10:13 - Logcat]device (HT971L900496) request rejected: device offline
java.io.IOException: device (HT971L900496) request rejected: device offline
I cant figure out what it is, it just works flawless one day and next I get this. I hope someone with a more expert knowledge of the tool chain can help as its really slowing me down so I am determined to get to the bottom of this.
Many thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我可以确认间歇性的“adb devices”问题可以归因于使用了错误的 USB 端口。
我觉得和各个端口的功率输出有关系(即功率不够)。
我在与 Android Note II(三星 Note 2 克隆版)的 USB 连接方面遇到了间歇性问题,持续了一周。
我不相信所有 Google 文章都说要使用不同的 USB 插座,
因为我认为除了联想 Thinkpad L420 右前方的两个之外,我没有其他任何东西。
你猜怎么着,最后仔细检查背面后,发现它在最末端有一个 USB 插座。
插入该插座后,“adb devices”始终会列出该设备。
万岁!
为了其他(Ubuntu)用户的利益,我展示了让“adb devices”工作的技巧。
我希望其他人发现此信息有用。
I can confirm that intermittent "adb devices" problems can be put down to using the wrong USB port.
I think it has something to do with the power output of the various ports (i.e. not enough power).
I had intermittent problems with USB connection to Android Note II (Samsung Note 2 clone) for a week.
I didn't believe all the Google articles saying to use a different USB socket,
because I didn't think I had any others than the two on the front right of my Lenovo Thinkpad L420.
Guess what, after finally checking the back carefully, there it is, a single USB socket on the very end.
After plugging into that socket, "adb devices" always lists the device.
Hooray!
For the benefit of other (Ubuntu) users, I am showing my tips for getting "adb devices" to work.
I hope someone else finds this information useful.
我不知道为什么会发生这种情况,但我找到了一个快速补救措施 - 首先杀死所有 adb 进程。
然后使用命令“adb start-server”再次启动 adb。
这样我就可以再次连接到手机
I don't know why it happens but I have found a quick remedy - first kill any adb process.
Then start the adb again with the command 'adb start-server'.
This then allows me to connect to the phone again
我为其他人找到的另一条信息:
http://groups.google.com/group/android-developers/browse_thread /thread/5fb922c2166eab68
我将 USB 插入计算机的正面,但遇到了问题 - 将其直接插入背面的 USB 控制器而不是集线器后,它变得更加可靠。
Another nugget of information for others that I found:
http://groups.google.com/group/android-developers/browse_thread/thread/5fb922c2166eab68
I had the usb plugged into the front of my computer and I was experiancing problems - after pluging it at the back direct to the usb controller and not a hub it has become much more reliable.
我也有同样的问题。这是我的解决方案:您必须在按下手机电源按钮的同时将 USB 线从 PC 连接到手机。
I had the same problem. Here is my solution: you have to connect the USB cable from your PC to your phone while pressing the power button of you phone.