Even after adding the dependencies and importing the class I am getting java.lang.NoClassDefFoundError: com.squareup.okhttp.logging.HttpLoggingInterceptor.
Can anyon
Also it can be connected with multidex true
option in your build.gradle
(yes, seems like some devices have problems with multidex apps (read, Samsung))
If this is your case, switch this flag off and rebuild your project. Consider using
minifyEnabled true
shrinkResources true
to reduce your apk size. If it is still too large, that's really weird and bad news, but there are some techniques to put your apk on diet.