解决okhttp的java.lang.IllegalStateException: closed错误
本文转自:https://blog.csdn.net/weixin_34138521/article/details/86444021错误如下原因为OkHttp请求回调中response.body().string()只能有效调用一次,而我使用了两次:String result = response.body().string();Log.e(TAG, "onRespo...
·
本文转自: https://blog.csdn.net/weixin_34138521/article/details/86444021
错误如下

原因为OkHttp请求回调中response.body().string()只能有效调用一次,而我使用了两次:
String result = response.body().string(); Log.e(TAG, "onResponse - " + response.body().string() );//打印时又使用了一次
更多推荐
所有评论(0)