implementation'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2' If you are using Kotlin pre-1.3 and experimental coroutines, downloadits latest JARor grab viaMaven: <dependency> <groupId>com.jakewharton.retrofit</groupId> <artifactId>retrofit2-kotlin-coroutines-experimental-adapter...
事情是这样的: 我在项目中使用kotlin作为开发语言,同时也引入了coroutnies(协程),使用协程替代了线程池.想要在api层使用协程,于是Github一波决定引入JakeWharton/retrofit2-kotlin-coroutines-adapter 一开始还觉得很诡异,因为我在网络请求的外围写了try cache捕获异常然后交给个上层做处理,而且不是所有的网络超时异常都捕...