android-java.net.ConnectException: failed to connect to localhost/127.0.0.1 (port 8080)
Android模拟器下127.0.0.1 或者localhost访问的是模拟器本机,如果想要访问电脑,使用10.0.2.2, 10.0.2.2是Android模拟器设置的特定ip,是本机电脑的alias
https://stackoverflow.com/questions/2301560/java-net-connectexception-127-0-0-18080-an-android-emulator
网友评论