android - Cant resolve setLevel on HttpLoggingInterceptor Retrofit2.0 -


i using retrofit , want log response , other things, using https://futurestud.io/tutorials/retrofit-2-log-requests-and-responses type facing cant resolve setlevel error

httplogginginterceptor logging = new httplogginginterceptor();    logging.setlevel(level.body); // getting error on  okhttpclient.builder httpclient = new okhttpclient.builder();    httpclient.addinterceptor(logging); //this getting error 

i using compile 'com.squareup.okhttp3:logging-interceptor:3.3.1' , retrofit compile 'com.squareup.retrofit2:converter-gson:2.1.0' dependency.

this got error

write interceptor code inside getclient() method like

public class restclient {      public getclient() {          httplogginginterceptor logging = new httplogginginterceptor();         logging.setlevel(httplogginginterceptor.level.body);  } } 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -