尽管升级了依赖项,但我无法将此方法转换为 RxJava3
fun setSearchField(searchField: EditText) {
searchDisposable = searchField.afterTextChangeEvents()
.skipInitialValue()
.debounce(400, TimeUnit.MILLISECONDS)
.map { it.editable()?.toString() ?: "" }
.distinctUntilChanged()
.observeOn(AndroidSchedulers.mainThread())
.subscribe(::onSearchQueryUpdated)
}
类型不匹配。必需:io.reactivex.rxjava3.disposables.Disposable?找到:io.reactivex.disposables.Disposable!
def retrofit_version = '2.9.0'
implementation "io.reactivex.rxjava3:rxjava:3.0.4"
implementation "io.reactivex.rxjava3:rxkotlin:3.0.0"
implementation "io.reactivex.rxjava3:rxandroid:3.0.0"
implementation "com.jakewharton.rxbinding3:rxbinding:3.1.0"
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
implementation "com.github.akarnokd:rxjava3-retrofit-adapter:3.0.0"
implementation "com.squareup.okhttp3:logging-interceptor:4.7.2"
我应该如何准确地从 RxJava2 中清理项目?
我试过无效缓存/重启:什么也没发生。