При використанні бібліотеки 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();