安卓开发笔记(十六):'Request(okhttp3.Request.Builder)' has private access in 'okhttp3.Request

当出现了'Request(okhttp3.Request.Builder)' has private access in 'okhttp3.Request的错误的时候,实际上是我们在写代码的时候少打了一个括号,我们只需要将代码改为:

Request request = new Request.Builder().url("https://www.baidu.com").build();

就好了,完美,不再报错 。

posted @ 2019-03-25 18:46  Geeksongs  阅读(2461)  评论(0编辑  收藏  举报

Coded by Geeksongs on Linux

All rights reserved, no one is allowed to pirate or use the document for other purposes.