-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RxAndroid in conjunction with RxJava 2 #348
Comments
@programmerr47 @JakeWharton @mttkay Hello,How do I solve this problem ? |
@xubuhang Hi. Simple: compile 'io.reactivex.rxjava2:rxandroid:2.0.0' |
Still have the same problem with io.reactivex.rxjava2:rxandroid:2.0.0. This is not solve the error observeOn(io.reactivex.Schedulers) in Observable cannot be applied to (rx.Scheduler) |
@viethoa You have a wrong import - |
@programmerr47 @JakeWharton @mttkay |
You're using the wrong import for AndroidSchedulers
…On Sat, Feb 11, 2017, 4:15 PM Ashutosh Sharma ***@***.***> wrote:
Still getting error io.reactivex.rxjava2:rxandroid:2.0.1. This does not
solve the error observeOn(io.reactivex.Schedulers) in Observable cannot be
applied to (rx.Scheduler)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#348 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEUPTsm4DUiqhpCDtHEE4kSq5EEUyks5rbiT-gaJpZM4Krx7Q>
.
|
@JakeWharton : These are my imports |
You have a 1.x observable and are trying to use a 2.x scheduler
…On Sat, Feb 11, 2017, 4:23 PM Ashutosh Sharma ***@***.***> wrote:
@JakeWharton <https://github.com/JakeWharton> :
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.schedulers.Schedulers;
These are my imports
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#348 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEEEauKEPAQITsBy63iI4-b1fP5o2CXks5rbibkgaJpZM4Krx7Q>
.
|
Your import for Observable should be |
@JakeWharton apology, it was import in another file, which was being reflected here. Thanks for the prompt reply. And hats off to your contribution in RxJava and other libraries |
@JakeWharton @bs2015 @dimsuz |
@ku4irka In 2.x, the |
@akarnokd please can show the example code, because i do not fully can understand you |
import io.reactivex.*;
import io.reactivex.disposables.*;
Disposable disposable = Disposables.empty();
disposable = io.reactivex.Observable.just(1).subscribeWith(new DisposableObserver<Integer>() {
// ...
}); https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#subscriber |
@akarnokd Thanks for the advice |
re check the import !! it should be as @replyashu said. |
i had this problem too and my mistake , i was using wrong imports for rxjava2 so i changed my imports to: |
Hello.
Recently rxJava 2 has been released.
So currently when I try to use rxAndroid 1.2.1 with rxJava 2.0.0:
I'm getting an error:
I suppose it is because in rxJava 2 Schedulers was moved from rx package to io.reactivex package.
My question is, how I can use rxAndroid in conjunction with rxJava 2?
Thank you.
The text was updated successfully, but these errors were encountered: