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

建议去除okhttp换成HttpUrlConnection,库中的okhttp可能会引起与Retrofit库中底层Okhttp版本冲突 #327

Open
hardgit opened this issue Aug 17, 2020 · 2 comments

Comments

@hardgit
Copy link

hardgit commented Aug 17, 2020

build_versions.min_sdk = 19
build_versions.target_sdk = 29
build_versions.compile_sdk = 29
build_versions.build_tools = "29.0.3"
测试机华为 P10

2020-08-17 10:52:42.940 1243-1730/com.axnx.ddsn 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 | No virtual method log(ILjava/lang/String;Ljava/lang/Throwable;)V in class Lokhttp3/internal/platform/Platform; or its super classes (declaration of 'okhttp3.internal.platform.Platform' appears in /data/app/com.axnx.ddsn-2/base.apk:classes3.dex)
2020-08-17 10:52:42.940 1243-1730/com.axnx.ddsn W/System.err: at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:367)
2020-08-17 10:52:42.940 1243-1730/com.axnx.ddsn W/System.err: at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:69)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at java.lang.Thread.run(Thread.java:776)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: Caused by: java.lang.NoSuchMethodError: No virtual method log(ILjava/lang/String;Ljava/lang/Throwable;)V in class Lokhttp3/internal/platform/Platform; or its super classes (declaration of 'okhttp3.internal.platform.Platform' appears in /data/app/com.axnx.ddsn-2/base.apk:classes3.dex)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at okhttp3.logging.HttpLoggingInterceptor$Logger$1.log(HttpLoggingInterceptor.java:111)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:161)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:112)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:87)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.kt:194)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at okhttp3.RealCall.execute(RealCall.kt:67)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at retrofit2.OkHttpCall.execute(OkHttpCall.java:180)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:42)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at io.reactivex.Observable.subscribe(Observable.java:12090)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:34)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at io.reactivex.Observable.subscribe(Observable.java:12090)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at io.reactivex.internal.operators.observable.ObservableRetryWhen$RepeatWhenObserver.subscribeNext(ObservableRetryWhen.java:150)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at io.reactivex.internal.operators.observable.ObservableRetryWhen.subscribeActual(ObservableRetryWhen.java:60)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at io.reactivex.Observable.subscribe(Observable.java:12090)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
2020-08-17 10:52:42.941 1243-1730/com.axnx.ddsn W/System.err: ... 6 more

@ProfessionalMe
Copy link

我也遇到同样问题,只能用回旧版本了,如果这个问题不解决,只能自己写一个了

@YwtQAQ
Copy link

YwtQAQ commented Apr 27, 2021

同上

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