ReactiveX / RxAndroid

RxJava bindings for Android
Apache License 2.0
19.89k stars 2.94k forks source link

connot resolve RxJava2CallAdapterFactory.create() #421

Closed Mahdihp closed 6 years ago

Mahdihp commented 6 years ago

connot resolve RxJava2CallAdapterFactory.create() from Using Retrofit 2:

 final Retrofit retrofit = new Retrofit.Builder()
                .baseUrl(mainUrl)
                .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
                .addConverterFactory(GsonConverterFactory.create())
                .build();
        return retrofit.create(tClass);

using of version in android: implementation 'io.reactivex.rxjava2:rxandroid:2.0.2' implementation 'io.reactivex.rxjava2:rxjava:2.1.12' implementation 'com.google.code.gson:gson:2.8.2' implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.retrofit2:converter-gson:2.4.0'

akarnokd commented 6 years ago

You have to import the adapter: https://github.com/square/retrofit/tree/master/retrofit-adapters/rxjava2#download

vanniktech commented 6 years ago

Also this issue is on the wrong repository.