How to fix it?
Process: www.palchiki.com.palchiki, PID: 2047
java.lang.IllegalArgumentException: Unable to create converter for class www.palchiki.com.palchiki.model.ServiceResponse
for method APIWebService.getServices
at retrofit2.Utils.methodError(Utils.java:154)
at retrofit2.MethodHandler.createResponseConverter(MethodHandler.java:62)
at retrofit2.MethodHandler.create(MethodHandler.java:33)
at retrofit2.Retrofit.loadMethodHandler(Retrofit.java:164)
at retrofit2.Retrofit$1.invoke(Retrofit.java:145)
at java.lang.reflect.Proxy.invoke(Proxy.java:393)
at $Proxy2.getServices(Unknown Source)
at www.palchiki.com.palchiki.fragment.ServiceFragment.onCreateView(ServiceFragment.java:94)
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
I use com.squareup.retrofit2:retrofit:2.0.0-beta4 and com.squareup.retrofit2:converter-gson:2.0.0-beta4
Adapter
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(URLWebService)
.addConverterFactory(GsonConverterFactory.create())
.client(okHttpClient)
.build();
Interface
@GET("/integration.php?command=getServices")
Call<ServiceResponse> getServices(@Query("city") String cityId);