Programming/Android

Connect local machine to AVD or Real Android phone

퀴노아 2016. 11. 29. 22:42

Problem: When I studied Android network programming I tried to connect my real phone(for debugging) to local machine via local ip 127.0.0.1 but it didn't work.(Neither virtual machine)

Reason: Even though AVD(virtual phone) is running on my real machine, it is logically seperated from my local network. 

Solution: Instead of using local network ip(127.0.0.1), use the real local machine's network IP. It is applied to both real android machine and AVD. (local machine's ip can be found via ipconfig command in cmd)