Skip to content
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

Exception: No static method checkUiThread #570

Closed
vladaman opened this issue May 10, 2023 · 1 comment
Closed

Exception: No static method checkUiThread #570

vladaman opened this issue May 10, 2023 · 1 comment

Comments

@vladaman
Copy link

Following code throws an exception:

 RxSearchView
   .queryTextChanges(searchView)
   .debounce(300, TimeUnit.MILLISECONDS, AndroidSchedulers.mainThread())
   .forEach(charSequence -> {
   });

Exception:

E AndroidRuntime: java.lang.NoSuchMethodError: No static method checkUiThread()V in class Lcom/jakewharton/rxbinding/internal/Preconditions; or its super classes (declaration of 'com.jakewharton.rxbinding.internal.Preconditions' appears in /data/app/~~q69_T9LcV-4ugXqTSL3k7w==/com.xxx-mFPL0MvCDs0AVIHwIQK_kg==/base.apk!classes18.dex)
05-10 13:38:22.173 11556 11556 E AndroidRuntime: 	at com.jakewharton.rxbinding.support.v7.widget.SearchViewQueryTextChangesOnSubscribe.call(SearchViewQueryTextChangesOnSubscribe.java:18)
05-10 13:38:22.173 11556 11556 E AndroidRuntime: 	at com.jakewharton.rxbinding.support.v7.widget.SearchViewQueryTextChangesOnSubscribe.call(SearchViewQueryTextChangesOnSubscribe.java:10)
05-10 13:38:22.173 11556 11556 E AndroidRuntime: 	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
05-10 13:38:22.173 11556 11556 E AndroidRuntime: 	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
05-10 13:38:22.173 11556 11556 E AndroidRuntime: 	at rx.Observable.unsafeSubscribe(Observable.java:10256)
05-10 13:38:22.173 11556 11556 E AndroidRuntime: 	at rx.internal.operators.OnSubscribeFilter.call(OnSubscribeFilter.java:45)
05-10 13:38:22.173 11556 11556 E AndroidRuntime: 	at rx.internal.operators.OnSubscribeFilter.call(OnSubscribeFilter.java:30)
05-10 13:38:22.173 11556 11556 E AndroidRuntime: 	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
05-10 13:38:22.173 11556 11556 E AndroidRuntime: 	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
05-10 13:38:22.173 11556 11556 E AndroidRuntime: 	at rx.Observable.subscribe(Observable.java:10352)
05-10 13:38:22.173 11556 11556 E AndroidRuntime: 	at rx.Observable.subscribe(Observable.java:10319)
05-10 13:38:22.173 11556 11556 E AndroidRuntime: 	at rx.Observable.subscribe(Observable.java:10124)
05-10 13:38:22.173 11556 11556 E AndroidRuntime: 	at rx.Observable.forEach(Observable.java:7180)

Using following in gradle:

    implementation 'io.reactivex:rxandroid:1.2.1'
    // Because RxAndroid releases are few and far between, it is recommended you also
    // explicitly depend on RxJava's latest version for bug fixes and new features.
    implementation 'io.reactivex:rxjava:1.3.0'
    implementation 'com.jakewharton.rxbinding:rxbinding:1.0.1'
    implementation 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:0.4.0'

May be related somehow to #204

@JakeWharton
Copy link
Owner

    implementation 'com.jakewharton.rxbinding:rxbinding:1.0.1'
    implementation 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:0.4.0'

The versions of all artifacts from this library must match. That is to say, the rxbinding-appcompat-v7 artifact should be updated to also be version 1.0.1.

@JakeWharton JakeWharton closed this as not planned Won't fix, can't repro, duplicate, stale May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants