Simulator through the android simulator debugging link localhost or 127.0.0.1, but the error it! !
Exception 1: java.net.ConnectException: localhost/127.0.0.1: 8080 -
Connection refused
The problem is this, android emulator (simulator) to its own as a localhost, that is, the code used to access localhost or 127.0.0.1, is access to the emulator yourself! This is not work!
Simulator in the simulator if you want to access your computer above, then use the built-in IP 10.0.2.2 android it, 10.0.2.2 is the simulator to set a specific ip, is your computer's alias alias
Remember that the emulator to access your computer using 10.0.2.2 local
Exception 1: java.net.ConnectException: localhost/127.0.0.1: 8080 -
Connection refused
The problem is this, android emulator (simulator) to its own as a localhost, that is, the code used to access localhost or 127.0.0.1, is access to the emulator yourself! This is not work!
Simulator in the simulator if you want to access your computer above, then use the built-in IP 10.0.2.2 android it, 10.0.2.2 is the simulator to set a specific ip, is your computer's alias alias
Remember that the emulator to access your computer using 10.0.2.2 local