use stethoInterceptor for debug

This commit is contained in:
xingxing
2017-03-08 23:35:14 +08:00
parent 5f501b27d1
commit d731abf929
2 changed files with 4 additions and 1 deletions

View File

@@ -96,7 +96,8 @@ dependencies {
compile 'jp.wasabeef:glide-transformations:2.0.1'
compile 'com.android.support:support-v13:24.1.0'
compile 'com.yuyh.imgsel:library:1.3.2'
compile 'com.facebook.stetho:stetho:1.4.1'
compile 'com.facebook.stetho:stetho:1.4.2'
compile 'com.facebook.stetho:stetho-okhttp3:1.4.2'
compile 'com.github.houxg:FlexLayout:1.2'
compile 'net.danlew:android.joda:2.9.5'

View File

@@ -1,6 +1,7 @@
package org.houxg.leamonax.network;
import com.elvishew.xlog.XLog;
import com.facebook.stetho.okhttp3.StethoInterceptor;
import org.houxg.leamonax.BuildConfig;
import org.houxg.leamonax.model.Account;
@@ -68,6 +69,7 @@ public class ApiProvider {
});
interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
builder.addNetworkInterceptor(interceptor);
builder.addNetworkInterceptor(new StethoInterceptor());
}
OkHttpClient client = builder.build();
mApiRetrofit = new Retrofit.Builder()