When I open Android Studio, it shows the dialog below, and my application can't run as debug mode.
Asked
Active
Viewed 3.1k times
3 Answers
24
Find the folder of sdk->platform-tool then run the command adb tcpip 5555
.
This should result in the following:
Now restart Android Studio and reconnect the Android Monitor:
-
In first image, `restarting in TCP mode: 5555` will be displayed only when an emulator is running, otherwise it displays `error: no connected devices`. – Nagaraju Gajula Oct 19 '16 at 04:27
8
- Stop adb from terminal by calling adb kill-server repeatedly to kill all running unstances of adb.
- Disable adb integration at android Studio by unmarking “Enable ADB Integration” (from toolbar -> Tools -> Android -> Enable ADB Integration).
- Enable ADB Integration again by marking “Enable ADB Integration”.
- Finally run project, so adb will be started automatically and properly.

Ayman Mahgoub
- 4,152
- 1
- 30
- 27
0
It looks like Android Studio 3.2 uses DNS to resolve "localhost" on OSX (that seems like a bad idea, Google), and in my case a bad DNS entry on the local DNS server broke things.
nmr2:notes nathan$ hostname
nmr2
nmr2:notes nathan$ host nmr2
nmr2.mycompany.co has address 192.168.0.31
nmr2:notes nathan$ host localhost
localhost.mycompany.co has address 192.168.0.85
nmr2:notes nathan$ sudo grep -rni 192.168.0.85 /etc
So, verify that localhost resolves to 127.0.0.1

nmr
- 16,625
- 10
- 53
- 67