Retrofit2.0 using with rxjava will do costly reflection in mian thread even using subscribeOn()
问题 Retrofit interface that return observable interface WeatherApi { companion object { val HOST = "https://api.heweather.com/x3/" val KEY = "41054a8f1d1a4ac992b1683e47a50146" } @GET("weather") fun getWeather(@Query("city") city: String, @Query("key") key: String) : Observable<Weather> } RestApi: class RestApi { var weatherApi: WeatherApi init { val logInterceptor = HttpLoggingInterceptor() logInterceptor.level = HttpLoggingInterceptor.Level.BODY val okClient = OkHttpClient.Builder()