person_add

android java volley error : I/Volley Error: java.net.ConnectException: Failed to connect to /127.0.0.1:8000

Development : Android Android Studio Java Volley

Posted by Tobirama 3 years ago



  • Tobirama 3 years ago

    Assuming that you're running this code on an Android Emulator and that whatever backend service you're calling is running on localhost also, change your login address to:

    //8080 being the port that localhost is assigned to - change it if needs be private static String URL_LOGIN = "http://10.0.2.2:8080/ligacao_bd/login.php";

    http://10.0.2.2:xxxx is the IP that is a special alias to your host loopback interface (127.0.0.1 on your dev machine)


    Reply


Your answer!



Similars contributions