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

Android 4.3报错误 #395

Open
JianfeiMa opened this issue Apr 6, 2022 · 3 comments
Open

Android 4.3报错误 #395

JianfeiMa opened this issue Apr 6, 2022 · 3 comments

Comments

@JianfeiMa
Copy link

2022-04-06 18:05:21.324 16465-16586/com.buyuphk.specialline1 W/System.err: io.reactivex.exceptions.UndeliverableException: The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | java.lang.NoClassDefFoundError: java.util.Objects
2022-04-06 18:05:21.324 16465-16586/com.buyuphk.specialline1 W/System.err: at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:367)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:69)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:234)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:153)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at java.lang.Thread.run(Thread.java:841)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: Caused by: java.lang.NoClassDefFoundError: java.util.Objects
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.Address.hashCode(Address.kt:180)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.Route.hashCode(Route.kt)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at java.util.HashMap.containsKey(HashMap.java:332)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at java.util.HashSet.contains(HashSet.java:138)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.connection.RouteDatabase.shouldPostpone(RouteDatabase.kt:40)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.connection.RouteSelector.next(RouteSelector.kt:74)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:199)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:109)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:77)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.connection.Transmitter.newExchange$okhttp(Transmitter.kt:162)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:35)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:82)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:84)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:71)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
2022-04-06 18:05:21.334 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at com.jess.arms.di.module.ClientModule$1.intercept(ClientModule.java:119)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.kt:184)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at okhttp3.RealCall.execute(RealCall.kt:66)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at retrofit2.OkHttpCall.execute(OkHttpCall.java:188)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:45)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at io.reactivex.Observable.subscribe(Observable.java:12267)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:34)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at io.reactivex.Observable.subscribe(Observable.java:12267)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at io.reactivex.internal.operators.observable.ObservableDefer.subscribeActual(ObservableDefer.java:40)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at io.reactivex.Observable.subscribe(Observable.java:12267)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at io.reactivex.internal.operators.observable.ObservableMap.subscribeActual(ObservableMap.java:32)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at io.reactivex.Observable.subscribe(Observable.java:12267)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
2022-04-06 18:05:21.344 16465-16586/com.buyuphk.specialline1 W/System.err: ... 7 more

@JianfeiMa
Copy link
Author

请问有谁知道这是什么原因

@wscjy
Copy link

wscjy commented Apr 6, 2022 via email

@JessYanCoding
Copy link
Owner

JessYanCoding commented Apr 7, 2022

https://stackoverflow.com/questions/37778644/java-lang-noclassdeffounderror-java-util-objects

报错是因为 OkHttp 用到的 java.util.Objects 静态方法只能在 4.4 以上(API 19+)使用,所以在 4.3 中找不到对应的方法,报 NoClassDefFoundError,解决方法,要不升级 App 最低版本到 API 19 以上,要不 降低 OkHttp 的版本

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

3 participants