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

java.lang.NoSuchMethodError: okhttp3.internal.Platform.log? #2130

Closed
RockyQu opened this Issue Dec 21, 2016 · 2 comments

Comments

2 participants
@RockyQu

RockyQu commented Dec 21, 2016

HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
logging.setLevel(HttpLoggingInterceptor.Level.BODY);
OkHttpClient httpClient = new OkHttpClient.Builder().addInterceptor(logging).build();

.client(httpClient)

An error:
FATAL EXCEPTION: OkHttp Dispatcher
Process: com.ld.smb, PID: 4129
java.lang.NoSuchMethodError: okhttp3.internal.Platform.log
at okhttp3.logging.HttpLoggingInterceptor$Logger$1.log(HttpLoggingInterceptor.java:109)
at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:157)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
at okhttp3.RealCall.access$100(RealCall.java:30)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:127)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
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:841)

Why?Why?

@JakeWharton

This comment has been minimized.

Show comment
Hide comment
@JakeWharton

JakeWharton Dec 21, 2016

Collaborator

You're using different versions of the okhttp and logging-interceptor artifacts. All OkHttp dependencies should be using the same version. 3.5.0 is the latest.

Collaborator

JakeWharton commented Dec 21, 2016

You're using different versions of the okhttp and logging-interceptor artifacts. All OkHttp dependencies should be using the same version. 3.5.0 is the latest.

@RockyQu

This comment has been minimized.

Show comment
Hide comment
@RockyQu

RockyQu Dec 21, 2016

Thank you!!!

RockyQu commented Dec 21, 2016

Thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment