Android之升级OkHttp编译提示错误如下Using ‘body(): ResponseBody?’ is an error. moved to val

1 问题

升级okHttp库,编译项目错误如下

Using 'body(): ResponseBody?’ is an error. moved to val

2 解决办法

原来的代码

val list = response.body().string()

去掉()就可以了

val list = response.body.string()
(0)

相关推荐