Volley Bug: Repeating a request when verbose logging is enabled fails

有些话、适合烂在心里 提交于 2019-12-10 17:29:38

问题


When trying to repeat a request after it has completed the Volley library throws an IllegalStateException if you have debug enabled (log.tag.Volley VERBOSE) because VolleyLog.Marker is marked as finished. If you disable the debug everything is fine.

I need to repeat a request because the api I am using has an api token and if a request returns a TOKEN_EXPIRED HTTP status code I need to refresh the token and repeat the exact same request. I don't want to construct the request again.

Is there a known workaround?


回答1:


I found a solution: Disable all volley debug logs.

 VolleyLog.DEBUG = false;


来源:https://stackoverflow.com/questions/26350035/volley-bug-repeating-a-request-when-verbose-logging-is-enabled-fails

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!