问题
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