Error in retrofit2 convert-gson: 2.1.0 [closed]

0

I'm having a very persistent error in Retrofit2 with error in line

GsonConverterFactory.create()

I've tried a lot of things and I can not do it.

Retrofit retrofit = new Retrofit.Builder()
        .baseUrl(UdacityService.BASE_URL)
        .addCallAdapterFactory(GsonConverterFactory.create())
        .build();

My gradient is as follows:

compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'

Does anyone know how to fix this?

    
asked by anonymous 13.01.2017 / 19:38

1 answer

1

Instead of

addCallAdapterFactory(GsonConverterFactory.create()) 

is

addConverterFactory(GsonConverterFactory.create())
    
13.01.2017 / 20:08