我想使用RxAndroid和RxJava,但我有點困惑哪些下面提到的庫我應該使用? 在一些教程它們使用例如以下類其可在哪個庫我應該使用RxAndroid和RxJava
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.9'
.subscribe(new Subscriber<String>)
和一些教程哎使用例如它們使用下列類,其是可以在以下的lib
compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
.subscribe(new Observer<String>)
moreover, in this lib there is no "Unsubscribe()" method??!!
和在觀察者類有一些所謂的一次性類
這不Subscriber類存在
此外, 請讓我知道我應該使用哪一個?
庫:
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.9'
compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0。您可以使用Disposable並調用dispose()。 – Raghunandan