Reputation: 161
When I open Android Studio, it shows the dialog below, and my application can't run as debug mode.
Upvotes: 14
Views: 30876
Reputation: 16850
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
Upvotes: 0
Reputation: 241
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:
Upvotes: 24
Reputation: 4220
Upvotes: 8