【发布时间】:2016-11-30 22:46:46
【问题描述】:
从改造升级到改造2后,我得到了这个错误。
致命异常:OkHttp 调度程序 进程:nz.co.datacom.mars.junction,PID:21616
java.lang.NoSuchMethodError:没有虚拟方法 Lokhttp3/internal/Platform 类中的 log(Ljava/lang/String;)V;或其 超类('okhttp3.internal.Platform'的声明出现在 /data/app/nz.co.datacom.mars.junction-1/base.apk)
在 okhttp3.logging.HttpLoggingInterceptor$Logger$1.log(HttpLoggingInterceptor.java:109) 在 okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:157) 在 okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190) 在 okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163) 在 okhttp3.RealCall.access$100(RealCall.java:30)
在 okhttp3.RealCall$AsyncCall.execute(RealCall.java:127)
在 okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 在 java.lang.Thread.run(Thread.java:818)
我在应用中使用的库版本是:
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.squareup.okhttp3:okhttp-urlconnection:3.2.0'
compile 'com.squareup:otto:1.3.7'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
不确定是不是因为 okhttp 版本,但我尝试了 2.3.0 和 3.4.0 之间的几个不同版本,但都没有工作。
有什么想法吗?提前致谢。
【问题讨论】:
标签: java android retrofit retrofit2 okhttp3