Okhttp报java.lang.IllegalStateException: closed

问题:
Okhttp解析中报java.lang.IllegalStateException: closed

原因:
OkHttp请求回调中response.body().string()只能有效调用一次

解决:

String bodyString = response.body().string();
//之后用这个bodyString

你可能感兴趣的:(Okhttp报java.lang.IllegalStateException: closed)