Noclassdeffounderror: Square Logging Interceptor V3.12.0
Issue After adding the Square Okhttp Logging Interceptor library to my Kotlin app I am experiencing the following error which I think may be due to a Guava dependency conflict. I'v
Solution 1:
In my case was that I installed logging-interceptor (3.13.1)
<dependency><groupId>com.squareup.okhttp3</groupId><artifactId>logging-interceptor</artifactId><version>3.13.1</version></dependency>
Which uses okhttp (3.13.1)
<dependency><groupId>com.squareup.okhttp3</groupId><artifactId>okhttp</artifactId><version>3.13.1</version></dependency>
And my Retrofit (2.5.0)
<dependency><groupId>com.squareup.retrofit2</groupId><artifactId>retrofit</artifactId><version>2.5.0</version></dependency>
Which uses okhttp (3.12.0)
<dependency><groupId>com.squareup.okhttp3</groupId><artifactId>okhttp</artifactId><version>3.12.0</version></dependency>
Because of the order (or smth.) okhttp dependency of logging-interceptor got ommited. I guess okhttp (3.12.0) is not compatible with logging-interceptor (3.13.1).
Solution 2:
I found the same issue, just adding logging-interceptor to gradle would crash the app.
I've tried different versions: 3.13.1 and 3.14.2 but only 4.0.0-alpha2 seems to be fixing the issue at the moment:
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.0.0-alpha02'
Post a Comment for "Noclassdeffounderror: Square Logging Interceptor V3.12.0"