When I run an Android application, I get an ADB error

When I launch the Android app, I received the 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

+4
source share
3 answers

I solve this problem by removing the local IPV6 host address from my hosts file and restarting Eclipse.

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

Mac OS x 10.7

adb 1.0.29

+2
source

Instead of clicking the “Launch Shortcut” button directly, try this.

Go to Run> Run Configurations

Choose your application

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

Check the box "Choose your preferred Android Virtual Device to deploy:" with the correct AVD, i.e. 2_2_Default_HV ...

Then click "Run" below.

+1
source

Just in case, someone will find that he is looking for an answer.

If you use Linux (I am running Debian, but it will also work on Ubuntu), you may find that ipv6 is connected and prevents eclipse and ddms from connecting to adb. To check if ipv6 is running, enter it in the terminal / shell:

 sudo sysctl -a|grep net.ipv6.bindv6only 

if you are given a line with the inscription "net.ipv6.bindv6only = 1", then only ipv6 binding is enabled. To disable it, enter this in the terminal:

 sudo sysctl -w net.ipv6.binv6only=0 

This will disable it. Now restart eclipse and try again. If this worked, then it really was connected with ipv6 bindings. To permanently disable it, edit the file /etc/sysctl.d/bindv6only and change the value from 1 to 0.

0
source

Source: https://habr.com/ru/post/1305263/


All Articles