retrofit = Retrofit.Builder() .baseUrl(baseUrl) //加上這條就可以,要放在gson前面 .addConverterFactory(ScalarsConverterFactory.create()) .addConverterFactory(GsonConverterFactory.create(gson)) .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) .client(httpClient) .build()
shawn