Using 'request(): Request' is an error. moved to val
See original GitHub issueWhen i use
val request = it.raw().request()
My build fails because of this error
Using 'request(): Request' is an error. moved to val
But if I try to access request using val request = it.raw().request
then code builds successfully but Android Studio shows it as an error in UI saying Cannot access 'request': It is package private in 'Response'.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
ResponseBody?' is an error. moved to val with okhttp - Stack ...
It looks like you're using OkHttp 4.0.0. The response.body() function has been deprecated. Instead, you need to access the body as a val, ......
Read more >ResponseBody?' is an error. moved to val with okhttp-kotlin
It looks like you're using OkHttp 4.0.0. The response.body() function has been deprecated. Instead, you need to access the body as a val,...
Read more >Android之升级OkHttp编译提示错误如下Using 'body()
' is an error. moved to val2 解决办法原来的代码val list = response.body().string()去掉()就可以了val list = response.body.string()...
Read more >OkHttpClient - OkHttp - Square Open Source
Conversely, creating a client for each request wastes resources on idle pools. Use new OkHttpClient() to create a shared instance with the default...
Read more >okhttp3.Request.kt Maven / Gradle / Ivy - Download JAR files
class Request internal constructor( @get:JvmName("url") val url: HttpUrl, ... message = "moved to val", replaceWith = ReplaceWith(expression = "url"), ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
how to remove old okhttp form classpath?
You also have 3.12.0 on your classpath, hence the problem.