版本
implementation 'cn.leancloud:storage-android:8.2.9.1'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
compileSdkVersion 30
targetSdkVersion 30
站内另一个onError的看过了 没有解决
代码:
LCQuery<LCObject> query = new LCQuery<>("Sponsors");
query.whereEqualTo("scannerKey", sc_key);
query.findInBackground().subscribe(new Observer<List<LCObject>>() {
日志有正常查询到内容但报错同样是 Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
java.lang.NullPointerException: Attempt to invoke interface method 'java.util.Iterator java.util.List.iterator()' on a null object reference
at cn.leancloud.core.j$h0.a(StorageClient.java:238)
at cn.leancloud.core.j$h0.apply(StorageClient.java:235)
at io.reactivex.internal.operators.observable.x0$a.onNext(ObservableMap.java:57)
at io.reactivex.internal.operators.observable.b1$a.onNext(ObservableOnErrorNext.java:68)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.c(ObservableObserveOn.java:201)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
at io.reactivex.android.schedulers.b$b.run(HandlerScheduler.java:124)
at android.os.Handler.handleCallback(Unknown Source:2)
at android.os.Handler.dispatchMessage(Unknown Source:4)
at android.os.Looper.loopOnce(Unknown Source:176)
at android.os.Looper.loop(Unknown Source:76)
at android.app.ActivityThread.main(Unknown Source:138)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(Unknown Source:11)
at com.android.internal.os.ZygoteInit.main(Unknown Source:309)