No class found exception com.squareup.okhttp.logging.HttpLoggingInterceptor

后端 未结 3 685
粉色の甜心
粉色の甜心 2021-01-18 06:15

Even after adding the dependencies and importing the class I am getting java.lang.NoClassDefFoundError: com.squareup.okhttp.logging.HttpLoggingInterceptor.

Can anyon

3条回答
  •  执念已碎
    2021-01-18 06:30

    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.

提交回复
热议问题