Stetho在Android Studio中用:
1, 引入
compile 'com.facebook.stetho:stetho:1.3.1'
compile 'com.facebook.stetho:stetho-okhttp3:1.3.1' //在okhttp中, 其他网络请求库要改
2, 初始化Stetho
public class MyApplication
extends Application {
public void onCreate() {
super.onCreate();
Stetho.initializeWithDefaults(this);
}
}
3, 修改网络请求(可选)
new OkHttpClient.Builder() .
addNetworkInterceptor(new StethoInterceptor()) .build()
4, 运行项目
在chrome中访问 chrome:
//inspect
找到你的项目 点击 inspect
转载于:https://www.cnblogs.com/wuyong0818/p/5984076.html
相关资源:数据结构—成绩单生成器