0

When I log in my application i give this kind of error in Logcat :

0191-10213/com.telera.ui.activities E/ODE-AL﹕ [1413] NetworkDispatcher.run: Unhandled exception java.lang.IllegalStateException: Adapter is detached.
java.lang.IllegalStateException: Adapter is detached.
        at org.apache.http.impl.conn.AbstractPooledConnAdapter.assertAttached(AbstractPooledConnAdapter.java:90)
        at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:118)
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
        at com.android.volley.toolbox.HttpClientStack.performRequest(HttpClientStack.java:83)
        at com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:93)
        at com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:105)

What can i do for fixing this problem ?

Raghunandan
  • 131,557
  • 25
  • 223
  • 252
John Error
  • 1,876
  • 5
  • 16
  • 22

1 Answers1

1

Are you using cookies and a custom stack?

When using cookies you can not have multiple requests at once and should set DEFAULT_NETWORK_THREAD_POOL_SIZE = 1 in the RequestQueue class.

Pratik Butani
  • 56,749
  • 54
  • 254
  • 407
slott
  • 3,236
  • 1
  • 34
  • 30
  • How can I set DEFAULT_NETWORK_THREAD_POOL_SIZE to 1 if i add volley library from build.gradle file? – Thunder Dragon Jun 23 '16 at 11:49
  • Dig into the code and see if there is a set method to override that value - or simply import the volley project code - easy to do. – slott Jun 25 '16 at 06:37