Jeśli twój skrypt php jest wdrożony na localhost i wdrażasz swoją aplikację na Androida na emulatorze, powinieneś użyć tego konstruktora:HttpPost httppost =new HttpPost("https://10.0.2.2/index.php");
Zobacz:https://developer.android.com/guide/developing /devices/emulator.html#emulatornetworking