Büşra Ceylan
Büşra Ceylan

Reputation: 11

java.net.SocketTimeoutException: failed to connect to /10.0.2.2 (port 443) from /10.0.2.15 (port 43794) after 2000ms

I'm trying to write a program in the android studio. I'm shooting the database with the webservice rest api. But I get this error, I couldn't log in. enter image description here

enter image description here

Upvotes: 0

Views: 6163

Answers (1)

on your okhttp client builder the connection timeout is 3 second, also make sure you are adding internet permission to the manifest file,

  • cleartextTrafficPermitted=false on manifest file.
  • if you are running the web service from the local servers like wamp or xxamp make sure to add all configurations required check this link

Upvotes: 2

Related Questions