1. 程式人生 > >安卓開發筆記(十六):'Request(okhttp3.Request.Builder)' has private access in 'okhttp3.Request

安卓開發筆記(十六):'Request(okhttp3.Request.Builder)' has private access in 'okhttp3.Request

baidu .com size 十六 開發筆記 span pri build 完美

當出現了‘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