I have created rest api from .net. I have simple login and registration android application. Here is code where I bind local ip
public class RetrofitClient {
private static Retrofit instance;
public static Retrofit getInstance() {
if (instance == null)
instance = new Retrofit.Builder()
.baseUrl("http://localhost:5000/")
.addConverterFactory(ScalarsConverterFactory.create())
.addConverterFactory(GsonConverterFactory.create())
.addCallAdapterFactory(RxJava2CallAdapterFactory.create())
.build();
return instance;
}
}
When I run the application and test my login function it return
Failed to connect to localhost/127.0.0.1:5000
How can I solve this issue