if you are using emulator to run your app for local server. mention the local ip as 10.0.2.2 and have to give Internet permission into your app....