При использовании библиотеки Apache HtppClient возможно появление исключения "Invalid use of SingleClientConnManager: connection still allocated.":
W/SingleClientConnManager(25450): Invalid use of SingleClientConnManager: connection still allocated.
W/SingleClientConnManager(25450): Make sure to release the connection before allocating another one.
Решается эта проблема путем закрытия потока InputStream. То есть, допустим, у Вас есть код:
HttpResponse response = client.execute( requestMethod );
InputStream instream = response.getEntity().getContent();
// some code
Чтобы этот код не генерировал исключение "Invalid use of SingleClientConnManager: connection still allocated.", необходимо в конце его выполнения закрыть поток чтения данных:
HttpResponse response = client.execute( requestMethod );
InputStream instream = response.getEntity().getContent();
// some code
instream.close();