java.lang.NoSuchFieldError: Companion
at okhttp3.internal.Util.(Util.kt:70)
at okhttp3.internal.concurrent.TaskRunner.(TaskRunner.kt:309)
at okhttp3.ConnectionPool.(ConnectionPool.kt:41)
at okhttp3.ConnectionPool.(ConnectionPool.kt:47)
at okhttp3.OkHttpClient$Builder.(OkHttpClient.kt:471)
at com.ejlchina.okhttps.okhttp.OkHttpBuilderImpl.build(OkHttpBuilderImpl.java:231)...
Environment: springboot
Denpendencies:
java.lang.NoSuchFieldError: Companion at okhttp3.internal.Util.(Util.kt:70)
at okhttp3.internal.concurrent.TaskRunner.(TaskRunner.kt:309)
at okhttp3.ConnectionPool.(ConnectionPool.kt:41)
at okhttp3.ConnectionPool.(ConnectionPool.kt:47)
at okhttp3.OkHttpClient$Builder.(OkHttpClient.kt:471)
at com.ejlchina.okhttps.okhttp.OkHttpBuilderImpl.build(OkHttpBuilderImpl.java:231)...
Environment: springboot
Denpendencies:
Example: HTTP http = HTTP.builder() .baseUrl("https://api.codelife.cc") .build(); http.async("/wallpaper/wallhaven") // http://api.example.com/users/1 .addUrlPara("lang", "cn") .addUrlPara("page", 1) .addUrlPara("sorting", "random") .addUrlPara("topRange", "6M") .addUrlPara("q", "id:2319") .setOnResponse((HttpResult res) -> { // 得到目标数据 List result = res.getBody().toList(WallHavenBO.class);
}).get();