I search a lot, I found some solutions like this:
System.setProperty(\"http.keepAlive\", \"false\");
arg0.addHeader(\"Connection\", \"close\");
arg0.addHeade
I finally resolve the problem. Like mromer said, the solution was to use both OkClient and OkHttp. After adding these two libraries I set the client on Retrofit to OkHttp like that:
RestAdapter restAdapter = new RestAdapter.Builder()
.setErrorHandler(new ErrorRetrofitHandlerException())
.setEndpoint(urlBase)
.setLogLevel(RestAdapter.LogLevel.FULL)
.setClient(new OkClient(new OkHttpClient()))
.build();
This is a known issue:
https://github.com/square/retrofit/issues/397
Did you try using OkHttp?
Check your internet connection, use a real device and test the app