Closed raghunandankavi2010 closed 8 years ago
You need to use https://github.com/JakeWharton/retrofit2-rxjava2-adapter for RxJava 2 not the built in adapter which only handles RxJava 1.
On Sun, Sep 25, 2016, 9:24 AM Raghunandan Kavi notifications@github.com wrote:
My application was not building due to duplicates files in .apk as mentioned here
ReactiveX/RxJava#4445 https://github.com/ReactiveX/RxJava/issues/4445
So adding this
packagingOptions { exclude 'META-INF/rxjava.properties' }
did not cause the problem again., but a new issue cropped up
Caused by: java.lang.IllegalArgumentException: Could not locate calladapter for io.reactivex.Observable
. Tried: * retrofit2.adapter.rxjava.RxJavaCallAdapterFactory * retrofit2.ExecutorCallAdapterFactory .... I do have
Retrofit retrofit = new Retrofit.Builder() .baseUrl(Constants.BASE_URL) .addConverterFactory(GsonConverterFactory.create()) .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) .build(); Observable
response = retrofit.create(Api.class).fetch_Feed(); My build.gradle file
compile 'com.squareup.okhttp3:okhttp:3.4.1' compile 'com.squareup.retrofit2:retrofit:2.1.0' compile 'io.reactivex.rxjava2:rxjava:2.0.0-RC3' compile 'io.reactivex.rxjava2:rxandroid:2.0.0-RC1' compile 'com.squareup.retrofit2:converter-gson:2.1.0' compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/square/retrofit/issues/2028, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEEYzP0HiDfYEXKr15ySySz_DZ0z7jks5qtnYngaJpZM4KF5qB .
Thank you. I missed that.
Thanks you
kiang kiang kiang
Thanks you
thanks
My application was not building due to duplicates files in .apk as mentioned here
https://github.com/ReactiveX/RxJava/issues/4445
So adding this
did not cause the problem again., but a new issue cropped up
I do have
And then
My build.gradle file
This could be related to RxJava2. This is not reproducible with version1. In which case issue should be opened in RxJava and this issue closed.