//初始化okgo
OkHttpClient.Builder builder = new OkHttpClient.Builder();
//全局的读取超时时间
builder.readTimeout(MILLISECONDS, TimeUnit.MILLISECONDS);
//全局的写入超时时间
builder.writeTimeout(MILLISECONDS, TimeUnit.MILLISECONDS);
//全局的连接超时时间
builder.connectTimeout(MILLISECONDS, TimeUnit.MILLISECONDS);
OkGo.getInstance().init(application).setOkHttpClient(builder.build());
#okgo混淆 #okhttp -dontwarn okhttp3.** -keep class okhttp3.**{*;} #okio -dontwarn okio.** -keep class okio.**{*;}