09-20 11:16:43.121 11934-11934/? E/Zygote: MountEmulatedStorage()
? ? v2
09-20 11:16:43.121 11934-11934/? E/Zygote: accessInfo : 0
09-20 11:16:43.121 11934-11934/? E/SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
09-20 11:16:46.621 11934-12167/com.hotbitmapgg.ohmybilibili E/AndroidRuntime: FATAL EXCEPTION: RxIoScheduler-2
? ? Process: com.hotbitmapgg.ohmybilibili, PID: 11934
? ? java.lang.IllegalStateException: Fatal Exception thrown on Scheduler.Worker thread.
? ? ? ? at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:62)
? ? ? ? at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
? ? ? ? at java.util.concurrent.FutureTask.run(FutureTask.java:237)
? ? ? ? at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
? ? ? ? at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
? ? ? ? at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
? ? ? ? at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
? ? ? ? at java.lang.Thread.run(Thread.java:818)
? ? Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lokhttp3/internal/Platform;
? ? ? ? at okhttp3.logging.HttpLoggingInterceptor$Logger$1.log(HttpLoggingInterceptor.java:109)
? ? ? ? at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:157)
? ? ? ? at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
? ? ? ? at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
? ? ? ? at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
? ? ? ? at okhttp3.RealCall.execute(RealCall.java:77)
? ? ? ? at retrofit2.OkHttpCall.execute(OkHttpCall.java:180)
? ? ? ? at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:171)
? ? ? ? at rx.internal.operators.OperatorSubscribeOn$1$1$1.request(OperatorSubscribeOn.java:80)
? ? ? ? at rx.Subscriber.setProducer(Subscriber.java:211)
? ? ? ? at rx.internal.operators.OperatorSubscribeOn$1$1.setProducer(OperatorSubscribeOn.java:76)
? ? ? ? at rx.internal.operators.OperatorMap$MapSubscriber.setProducer(OperatorMap.java:99)
? ? ? ? at rx.Subscriber.setProducer(Subscriber.java:205)
? ? ? ? at rx.Subscriber.setProducer(Subscriber.java:205)
? ? ? ? at rx.Subscriber.setProducer(Subscriber.java:205)
? ? ? ? at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:152)
? ? ? ? at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:138)
? ? ? ? at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
? ? ? ? at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
? ? ? ? at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
? ? ? ? at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
? ? ? ? at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)
? ? ? ? at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
? ? ? ? at rx.Observable.unsafeSubscribe(Observable.java:8460)
? ? ? ? at rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)
? ? ? ? at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:222)
? ? ? ? at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
? ? ? ? at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)?
? ? ? ? at java.util.concurrent.FutureTask.run(FutureTask.java:237)?
? ? ? ? at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)?
? ? ? ? at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)?
? ? ? ? at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)?
? ? ? ? at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)?
? ? ? ? at java.lang.Thread.run(Thread.java:818)?
? ? Caused by: java.lang.ClassNotFoundException: Didn't find class "okhttp3.internal.Platform" on path: DexPathList[[zip file "/data/app/com.hotbitmapgg.ohmybilibili-2/base.apk", zip file "/data/app/com.hotbitmapgg.ohmybilibili-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.hotbitmapgg.ohmybilibili-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.hotbitmapgg.ohmybilibili-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.hotbitmapgg.ohmybilibili-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.hotbitmapgg.ohmybilibili-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.hotbitmapgg.ohmybilibili-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.hotbitmapgg.ohmybilibili-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.hotbitmapgg.ohmybilibili-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.hotbitmapgg.ohmybilibili-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.hotbitmapgg.ohmybilibili-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.hotbitmapgg.ohmybilibili-2/split_lib_slice_9_apk.apk"],nativeLibraryDi
09-20 11:16:46.641 11934-11934/com.hotbitmapgg.ohmybilibili E/RecyclerView: No adapter attached; skipping layout
? ? No adapter attached; skipping layout
09-20 11:16:46.701 11934-11934/com.hotbitmapgg.ohmybilibili E/RecyclerView: No adapter attached; skipping layout
解決問題:
使用OKHttp3作為網(wǎng)絡訪問的框架時,可能要經(jīng)常查看日志梯嗽,這時我們可以引入logging-interceptor攔截器阐污。如下:
compile'com.squareup.okhttp3:logging-interceptor:3.8.1'
1
但是蚊逢,如果出現(xiàn)如題目中的錯誤丰滑,那原因應該就是logging-interceptor的版本和OkHttp3的版本不一樣肾胯,保持一樣就可以了闲勺。
compile'com.squareup.okhttp3:logging-interceptor:3.8.1'compile'com.squareup.okhttp3:okhttp:3.8.1'