开发者

When Running android app I get ADB error

When i r开发者_如何转开发unning Android App i got following error..

[2010-03-27 02:47:28 - HelloAndroid] Connection with adb was interrupted.
[2010-03-27 02:47:28 - HelloAndroid] 0 attempts have been made to reconnect.
[2010-03-27 02:47:28 - HelloAndroid] You may want to manually restart adb from the Devices view.

How can i fix this ? Thanks Atul Yadav


I solve this problem by remove the IPV6 localhost address from my hosts file and by restarting Eclipse.

 #::1            localhost
 #fe80::1%lo0    localhost

Mac OS x 10.7

adb 1.0.29


Instead of clicking the Run shortcut directly, try this.

Go to Run > Run Configurations

Select your App

Click the tab marked Target(between Android and Common, below Name:)

Check the box under "Select a preferred Android Virtual Device for deployment:" with the correct AVD ie. 2_2_Default_HV...

Then press Run at the bottom.


Just in case anyone finds this looking for an answer.

If you are running Linux (I'm running Debian but this will work on the Ubuntu too) you may find that ipv6 is bound and that is preventing eclipse and the ddms from connecting to the adb. To check if ipv6 is running, enter this into a terminal/shell:

sudo sysctl -a|grep net.ipv6.bindv6only

if you are then given a line saying "net.ipv6.bindv6only = 1" then ipv6 bind only is enabled. To disable it enter this in a terminal:

sudo sysctl -w net.ipv6.binv6only=0

That will disable it. Now restart eclipse and try again. If that works then it was indeed ipv6 bindings that caused the issue. To permanently disable it edit the file /etc/sysctl.d/bindv6only and change the value from 1 to 0.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜