当我登录我的应用程序时,我在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)
我该怎么做才能解决这个问题?
答案 0 :(得分:1)
您使用的是Cookie和自定义堆栈吗?
使用Cookie时,您不能同时拥有多个请求,并应在DEFAULT_NETWORK_THREAD_POOL_SIZE = 1
类中设置RequestQueue
。