安卓开发笔记(十六):'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();

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

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

上一篇:IBM Security AppScan 简单实用说明


下一篇:Android 8通过startService引起crash问题