在鸿蒙应用开发中使用OkHttp的时候出现了一个匪夷所思的Bug,错误提醒如下:
Device info:JAD-AL50
Build info:JAD-AL50 2.0.0.241(C00E230R3P4)
Module name:com.example.attendenceapplication
Version:1.0.0
Pid:4504
Uid:1011557
Foreground:Yes
Reason:IllegalStateException
Selected stacktrace:
java.lang.IllegalStateException: closed
at okio.RealBufferedSource.select(RealBufferedSource.java:93)
at okhttp3.internal.Util.bomAwareCharset(Util.java:467)
at okhttp3.ResponseBody.string(ResponseBody.java:181)
at com.example.attendenceapplication.slice.TakePhotoSlice$2.onResponse(TakePhotoSlice